On Thursday, November 29, 2012 11:32:43 AM UTC+1, VMV wrote:
> I want to do a sentence which show me only the commits( no merge/ no push)
> of a branch. Is it posible?
Also not quite sure what you mean here, but I'm guessing you want to see
what commits have occurred on a branch since it branched out from master.
First thing you maybe should do is to orient yourself to see what those
commits look like graphically. Either use some git GUI like gitk, or do
this in the command line:
git --graph --oneline --decorate --all
Now you hopefully can find the branch and get some impression of which
commits you are looking for.
If you want the git command that finds only the commits that have occurred
in the branch 'foo' since it diverged from default branch "master", this
should do it:
git log master..foo
(Strictly speaking, this means "show me all commits that are reachable from
the ref 'foo', but not from the ref 'master'. See
http://git-scm.com/book/en/Git-Tools-Revision-Selection for more
If you want to find the commits in a branch that has already been merged,
this is the closest thing I have found to an answer: