[gmx-users] help with git
Mark Abraham
mark.abraham at anu.edu.au
Tue Aug 24 17:12:23 CEST 2010
----- Original Message -----
From: Alan <alanwilter at gmail.com>
Date: Wednesday, August 25, 2010 0:10
Subject: Re: [gmx-users] help with git
To: Discussion list for GROMACS users <gmx-users at gromacs.org>
> Sorry if confused... because I am *really* confused too with git.
> Anyway, I started anew again and it seems to be working now.>
> So I clone gmx:>
> git clone git://git.gromacs.org/gromacs.git > cd gromacs> git branch> * master> git pull> Already up-to-date.> # now I want to move to 'release-4-5-patch' branch> git checkout -t origin/release-4-5-patches
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".
I think you just want "git checkout release-4-5-patches" from a fresh clone.
> Branch release-4-5-patches set up to track remote branch release-4-5-patches from origin.> Switched to a new branch 'release-4-5-patches'> git branch > master> * release-4-5-patches> git pull > Already up-to-date.> # now I want to go back to master> git checkout -t origin/master > fatal: git checkout: branch master already exists
-t is trying to create the branch. So don't do that.
> git branch > master> * release-4-5-patches> # didn't change, let's try another command (and here starts my 'guessing' experiment) > git checkout master> Switched to branch 'master'> # nice it works!
Sure.
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20100825/de84d1ab/attachment.html>
More information about the gromacs.org_gmx-users
mailing list