markusC64 / nibtools

29 stars 14 forks source link

How to clone branches ? #1

Open delacroix0815 opened 7 years ago

delacroix0815 commented 7 years ago

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 ?

markusC64 commented 7 years ago

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.

andlabs commented 5 years ago

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.