Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git log --follow, show all commits including merges

Tags:

I would like to git log --follow file.ext but showing all commits, including merges.

Tried no-max-parents, but not helping.

like image 263
lajarre Avatar asked May 25 '15 18:05

lajarre


People also ask

Does git merge bring all commits?

Git merging combines sequences of commits into one unified history of commits. There are two main ways Git will merge: Fast Forward and Three way. Git can automatically merge commits unless there are changes that conflict in both commit sequences.

How do I get a list of all commits?

The most basic and powerful tool to do this is the git log command. By default, with no arguments, git log lists the commits made in that repository in reverse chronological order; that is, the most recent commits show up first.

How can you tell if a commit was merged?

To see the merge commit's message and other details, use git show-merge with the same arguments.

How do I get a list of commits between two commits?

To see the changes between two commits, you can use git diff ID1.. ID2 , where ID1 and ID2 identify the two commits you're interested in, and the connector .. is a pair of dots. For example, git diff abc123.. def456 shows the differences between the commits abc123 and def456 , while git diff HEAD~1..


1 Answers

The -m will do the trick for you, log -m is for get into the merges.

git log -m --oneline --full-history --follow file.ext

This should follow the file in the Merges [-m].

And i assume you was aiming to use --min-parents=2 instead of no-max-parents. The --min-parents=2 is the same as --merged since it will return the commit with more then one parent.

You can always add some extra flags to display the results in a more friendly way:
git log -m --name-only --oneline --follow file.ext. It will display the results with the SHA-1 of the commits as well with the message

like image 90
CodeWizard Avatar answered Nov 25 '22 14:11

CodeWizard