سؤال

I'm doing a :

git diff --diff-filter=AM --name-only 59ade6e..c1fc4d8

The 59ade6e hash is a commit where I added all my files (my first commit).

But when I execute my command it seems that it doesn't contain these added files. How can really include my hash revision to this diff ?

هل كانت مفيدة؟

المحلول

If 59ade6e is your root commit, you are probably looking for this command:

git ls-tree --name-only -r 59ade6e

نصائح أخرى

Use the ~1 notation:

git diff --diff-filter=AM --name-only 59ade6e~1..c1fc4d8

This will do the diff between the commit previous to 59ade6e and c1fc4d8

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top