user3361103
user3361103

Reputation: 13

How do I determine whether or not a file was last changed by one of a finite set of git commits?

I have a git repository that several distinct groups of developers can change. I can determine the set of commits that were made by a give group based on the content of commit messages. Is there any way to determine whether or not a specific file was last changed by a member of the afore mentioned set of commits? In other words, can I determine whether or not the last change to a file was made by commits A, B, or C?

Upvotes: 1

Views: 35

Answers (1)

Magnus Bäck
Magnus Bäck

Reputation: 11571

git log --no-walk commit1 commit2 ... commitN -- file1 file2 ... fileN

This means: Show information about the listed commits without following their ancestries (without --no-walk the listed commits will be subject to a recursive parent traversal), and restrict to those commits that touch the interesting files listed at the end.

Upvotes: 2

Related Questions