Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git - how to get the full message from git merge --log

Tags:

git

git-merge

After using git merge --log --no-ff --no-commit or git merge --log --squash, a long commit message is created.

But the message is cut i.e ... at the end and does not list all commits.

How do I get the full message?

I checked the files in .git/MERGE_HEAD and .git/SQUASH_HEAD and it also contains the short message with ...

Thanks

like image 212
hbt Avatar asked Nov 21 '12 23:11

hbt


People also ask

How do I conclude a merge in git?

After a git merge stops due to conflicts you can conclude the merge by running git merge --continue (see "HOW TO RESOLVE CONFLICTS" section below). Commits, usually other branch heads, to merge into our branch.

Which command is used to display merge history in git?

After you have created several commits, or if you have cloned a repository with an existing commit history, you'll probably want to look back to see what has happened. The most basic and powerful tool to do this is the git log command.


1 Answers

Note that the --log option is actually --log<=n> (from git merge):

In addition to branch names, populate the log message with one-line descriptions from at most <n> actual commits that are being merged. See also git-fmt-merge-msg.

So by specifying a large number for n, you should see all the commits in the merge log message.
By default, only the first 20 commits are listed.

The config setting merge.log can also be used to specify that number.

like image 113
VonC Avatar answered Oct 14 '22 20:10

VonC