When you're doing a git clone
it will checkout a master
branch by default. To specify branch during clone use (in your case)
git clone SHARED_PATH -b LOCAL_REPO
And for your 2nd issue, probably git pull --all
should help
Frage
I am trying to set up a local repository (LOCAL_REPO) from some git branch (MASTER) which is to be used by a group of people.
MASTER------>LOCAL_REPO
To do this i did the following :
This creates a branch LOCAL_REPO for me at my local shared directory (SHARED_PATH)
Now this LOCAL_REPO is used amon a set of people and any changes that they commit will be to LOCAL_REPO which can be synced with MASTER. So i tried creating local branch(MY_LOCAL) for myself at some path.
I am facing following issues :
Blockquote fatal: git checkout: updating paths is incompatible with switching branches
After that i tried "git remote show origin" , this shows me LOCAL_REPO as remote and tracked. What is the mistake i am doing here ?
Lösung
When you're doing a git clone
it will checkout a master
branch by default. To specify branch during clone use (in your case)
git clone SHARED_PATH -b LOCAL_REPO
And for your 2nd issue, probably git pull --all
should help