<br><br>----- Original Message -----<br>From: Alan &lt;alanwilter@gmail.com&gt;<br>Date: Wednesday, August 25, 2010 0:10<br>Subject: Re: [gmx-users] help with git<br>To: Discussion list for GROMACS users &lt;gmx-users@gromacs.org&gt;<br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>Sorry if confused... because I am *really* confused too with git.<div><br></div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>Anyway, I started anew again and it seems to be working now.</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font><br></div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>So I clone gmx:</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font><br></div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>git clone git://<a href="http://git.gromacs.org/gromacs.git" target="1">git.gromacs.org/gromacs.git</a></div>  <div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>cd gromacs</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>git branch</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>* master</div><div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>git pull</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>Already up-to-date.</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font># now I want to move to 'release-4-5-patch' branch</div><div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>git checkout -t origin/release-4-5-patches <br><br>If you read the help/manpage for "git checkout" (http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html), then you will realise you don't want "-t". Tracking of upstream branches is normally set up when the branch is created. Rarely, having created a branch, you now want it track something upstream, and you can do that too. However, unless you're creating branches don't worry about it. These branches already exist - see "git branch -a".<br><br>I think you just want "git checkout release-4-5-patches" from a fresh clone.<br><br></div>  <div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>Branch release-4-5-patches set up to track remote branch release-4-5-patches from origin.</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>Switched to a new branch 'release-4-5-patches'</div></div><div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>git branch&nbsp;</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>&nbsp;&nbsp;master</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>  * release-4-5-patches</div></div><div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>git pull&nbsp;</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>Already up-to-date.</div></div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font># now I want to go back to master</div><div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>git checkout -t origin/master &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>fatal: git checkout: branch master already exists<br><br>-t is trying to create the branch. So don't do that.<br><br></div>  </div><div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>git branch &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>&nbsp;&nbsp;master</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>* release-4-5-patches</div></div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font># didn't change, let's try another command (and here starts my 'guessing' experiment)</div> <div> <div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>git checkout master</div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font>Switched to branch 'master'</div></div><div><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">&gt; </font># nice it works!<br><br>Sure.<br><br>Mark<br></div></div>