In our repo we have 3 primary branches.
development
developers branch from development, do their work and merge back into development. UAT
once the client is ready we merge development into UAT live
once UAT passes we merge UAT into liveI would like a list of all git-log commit messages for merges into the development branch.
I would like to exclude all other merges, eg development to some other branch, live to UAT, UAT to dev, dev to UAT.
Currently I have this
git log --merges --since="2022-07-27 16:00:00" --grep='Merged\sPR\s\d+:\s' -P --pretty=oneline
This will get me all the merge commits
How to get rid commit messages for merges from live to UAT to development?
The merge message is quite standardize if you don't change it by hand.
For example
git log --all --grep="Merge.*into '\?development'\?"
Will match commit with
Merge branch 'fix/foo' into development
and
Merge branch 'fix/bar' into 'development'
To follow only the leftmost line in your graph (the blue one), add --first-parent
:
git log --oneline --first-parent [other options ...] development
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.