nibtools icon indicating copy to clipboard operation
nibtools copied to clipboard

How to clone branches ?

Open delacroix0815 opened this issue 8 years ago • 2 comments

Hello, i'd like to clone the markusC64-v637 branch, because cloning the master branch only hands out the README.md file. Unfortunately, the markusC64-v637 branch is stale. Is there a way to clone it at all ?

delacroix0815 avatar May 26 '17 17:05 delacroix0815

Hard to say, bur for sure there is one way (with the side effect that github does not know that your repo is actually cloned):

Create a local repository on your PC:

$ git init

Fetch the branch

$ git fetch https://github.com/markusC64/nibtools.git markusC64-v637-branch

Replace the content of the current branch with the fetched branch

$ git reset --hard FETCH_HEAD

and then upload your local repo to a fresh hithub repository.

markusC64 avatar May 26 '17 18:05 markusC64

Note that when you git clone, you get all the branches already, you just have to switch to them:

$ git checkout markusC64-v637-branch

You can run git branch to see a list of all branches.

andlabs avatar Oct 10 '19 12:10 andlabs