Git to find which branches were merged into the current branch, and when

I have several branches of functions that are automatically merged into an integration branch. I would like to know if and when this happens.

I can print git log which will show me that the merge has occurred, but for some reason it does not show me which function branch it just says "merged integration_branch into integration_branch"

I can print git branch --merged

but only lists of feature branches that merge into an integration branch. I would like to know when and by whom, and be able to deploy this merger information.

+4
source share
1 answer

I would use git log with some colors for this:

 git log --graph --full-history --all --color \ --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s" 

This will color each branch and merge. It will also indicate the title of each branch.

You can add relative dates and committer names as follows:

 git log --graph --full-history --all --color \ --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s \ %Cgreen(%cr) %C(bold blue)<%an>%Creset'" 

For more details see: http://git-scm.com/book/en/Git-Basics-Viewing-the-Commit-History

+9
source

All Articles