I need to generate a changelog of sorts between two Tags within a project controlled using git, specifically the android source code. This list should include any files/directories/etc which have been edited, moved, renamed, deleted, created.
Any help would be great. And if you have a way to do this over the entire android source at once... even better.
git show --name-only SHA1 . you can also do: git diff --name-only HEAD@{3} HEAD@{0} for the exact commits you want to compare.
The super-short version is that git status runs git diff . In fact, it runs it twice, or more precisely, it runs two different internal variations on git diff : one to compare HEAD to the index/staging-area, and one to compare the staging-area to the work-tree.
If you need to find which files differ:
git diff --name-only <tag1> <tag2>
If you need to find all changed files:
git log --name-only --pretty=format: <tag1>..<tag2> |
grep -v '^$' | sort | uniq
The --pretty=format:
is to supress printing information about commits, and print only the diff part. Note that in the case of git log the order of <tag1>
and <tag2>
matters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With