sooqua
sooqua

Reputation: 438

Git - What's the branch I'm merging from?

How to get name of the branch I'm merging from? git status tells me only that I'm merging, but I forgot what branch exactly I'm merging...

On branch master
Your branch is up-to-date with 'origin/master'.
All conflicts fixed but you are still merging.
  (use "git commit" to conclude merge)

Upvotes: 1

Views: 105

Answers (3)

G. Sylvie Davies
G. Sylvie Davies

Reputation: 5517

 ​git show MERGE_HEAD -s --pretty=%d

Upvotes: 0

CodeWizard
CodeWizard

Reputation: 142362

To make it clear for everyone who still seek for similar answer

The answer was posted as comment by @PetSerAL

xargs git log --decorate --no-walk=unsorted --oneline < .git/MERGE_HEAD

Upvotes: 1

Matias Barone
Matias Barone

Reputation: 168

try git show-branch

It show a list of branches and the last commit on each. If there is a merge it show a - in the merge.

Upvotes: 2

Related Questions