Show all commits in git branches, since the source branch point from the wizard

I am looking for a way to see all the commits on the active branch from the branch point (and including it) and, hopefully, from the branch from the master.

For example, a situation like:

ABCD (master) \ EF (branch A) 

I want to get commits F, E and B, and F - HEAD.

And for

 ABCD (master) \ EF (branch B) \ G (branch C) 

I want to get commits G, F, E, B in case G is the current HEAD. Displaying this information with the -graph option will also be great.

Now i came up with

 git log master^..HEAD 

But it seems that too much information is being displayed (e.g. commits from other branches). Thank you for your help!

+6
source share
1 answer

From β€œ How to run Git Register to see changes for a specific branch only? ”, This should be enough:

 git log --boundary master.. # or git log --boundary --no-merges master.. 

More concise presentation:

 git log --boundary --no-merges --pretty='%C(yellow)%h%d %Creset%an %Cgreen%ar:%Creset %s' --graph master.. 

(add --boundary as torek comments to include B 'in it, which would otherwise be excluded from the result of the Git log)

+1
source

Source: https://habr.com/ru/post/958187/


All Articles