I don't want to check out the remote branch and go into detached head state.

Basically I want to create a local branch which tracks the remote branch.

When I clone the original repository I then can checkout a branch by just 
saying 'git checkout Version-1.3'.
This then creates a local branch Version-1.3 which tracks 
origin/Version-1.3.

Now I tried your suggestion below instead of 'git clone path/to/git/bundle' 
to create the clone:
  git init target 
  cd target 
  git fetch -u path/to/git/bundle 'refs/*:refs/*' 
  git reset --hard 

And then this suggestion to do the checkout:
git checkout -b foo origin/Version-1.3

This works! Thanks for your help!

I still do not understand why I have to use different commands when cloning 
the bundle instead of the original repo but I will read the documentation 
you suggested.


-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to