Re: Finding the name of the parent branch?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/1/30 Pascal Obry <pascal@xxxxxxxx>:
>> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux