docs:git:working_copies_of_multiple_branches

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:git:working_copies_of_multiple_branches [2009/11/08 00:55] billhdocs:git:working_copies_of_multiple_branches [2009/11/08 01:07] (current) billh
Line 9: Line 9:
 cd /foo/base cd /foo/base
 git branch alt git branch alt
 +  (make sure you have a branch called 'alt' in the main repo before cloning)
 cd .. cd ..
 git clone /foo/base /foo/alt git clone /foo/base /foo/alt
Line 19: Line 20:
 git pull git pull
 git push origin alt git push origin alt
-  (you can also just run 'git push')+  (you can also just run 'git push' unless you don't want to update other branches) 
 +</code> 
 + 
 +Your .git/config file will show the alt branch configured like this:<code> 
 +[branch "alt"
 +    remote = origin 
 +    merge = refs/heads/alt
 </code> </code>
  
Line 82: Line 89:
  
 You should now be able to 'git pull' and merge any changes from the main repo. You should now be able to 'git pull' and merge any changes from the main repo.
 +
 +===== External Links =====
 +* [[http://www.sourcemage.org/Git_Guide|Git Guide]] (see section titled **I want to work on an upstream branch other than "master"**)
 +
  • docs/git/working_copies_of_multiple_branches.1257666943.txt.gz
  • Last modified: 2009/11/08 00:55
  • by billh