kjo
kjo

Reputation: 35301

How can I tell which files were committed for the first time at a given commit?

The best I have for this is to diff the commit's tree with its parent's, and look for additions. E.g.

$ diff <( git ls-tree --name-only -r 1234567  ) \
       <( git ls-tree --name-only -r 1234567~ ) | grep '^< '

Is there something more civilized than this?

Upvotes: 0

Views: 16

Answers (1)

Vampire
Vampire

Reputation: 38629

How about this:

git diff --name-only --diff-filter=A 1234567^!

Upvotes: 3

Related Questions