From: Santi Béjar Date: Fri, 30 Jan 2009 14:46:27 GMT Subject: Re: Finding the name of the parent branch? Message-ID: In-Reply-To: 2009/1/30 Pascal Obry : >> At least part of. You have to understand the branch model: >> >> git model: >> * a branch is just a pointer to a commit >> * you cannot say "this commit was done in that branch" >> * what you can say is "this commit is contained in that branch" > > The second point wasn't clear to me. A practical example: $ git clone path/to/project.git $ cd project $ git checkout -b bugfix-1234 origin/master $ # hack, hack, hack $ git commit -a -m "Fix for the Bug #1234" $ git push origin HEAD:master So, you've done a commit in a local branch named bugfix-1234 and once you push it to the master branch in origin there is nothing to tell you so. A commit is defined with the current state, the old commit(s) and some metadata (author and committer) but nothing about which branch it was made, and as a branch is a pointer to a commit there is nothing more. Santi