Reputation: 1370
I have main branch in git: master
and a number of feature branches: feature/adding-some-func
and etc.
After the merging feature
branch to master
I have commit with message like:
Merge pull request #33 in test-proj from feature/adding-some-func to master
How can i get the name of just merged branch(feature/adding-some-func) after the cloning repository? So, as result I need to get feature/adding-some-func but in the logs i see only SHA, Commit Authors
Upvotes: 4
Views: 4105
Reputation: 46
If you want to be very specific, you can use:
git log --merges origin/master --oneline --grep='^Merge pull request #\([0-9]\+\) in \(.\+\) from \(.\+\) to master' -1
Upvotes: 3