I need to get a list of all the changed files from the initial commit until the latest one.
So, here is my case:
$ git init .
$ echo "test1" > test1
$ git add test1
$ git commit -m "test 1"
$ echo "test2" > test2
$ git add test2
$ git commit -m "test 2"
$ echo "test3" > test3
$ git add test3
$ git commit -m "test 3"
$ git log
commit 13b72d5468dfbb9582ad4d225cf1e6e8bb17f1bc (HEAD -> master)
Author: carlspring <...>
Date: Fri Feb 12 18:58:58 2021 +0000
test 3
commit 6955a875fdf57efaa3859827b7f975fa26095d38
Author: carlspring <...>
Date: Fri Feb 12 18:58:56 2021 +0000
test 2
commit 9410cf6a98986794c8ffe38c15cc60eaa054705c
Author: carlspring <...>
Date: Fri Feb 12 18:58:56 2021 +0000
test 1
carlspring@carlspring:/tmp/test$ git log --all --full-history --pretty=%H
13b72d5468dfbb9582ad4d225cf1e6e8bb17f1bc
6955a875fdf57efaa3859827b7f975fa26095d38
9410cf6a98986794c8ffe38c15cc60eaa054705c
I would like to get a list that produces all the changed files since the first commit and look like this:
test1
test2
test3
Now, I've obviously seen all the answers here that recommend using git diff-tree
, so tried it:
$ git diff-tree --no-commit-id --name-only -r 9410cf6a98986794c8ffe38c15cc60eaa054705c..HEAD
test2
test3
Why am not getting test1
as well?