Skip to content

Instantly share code, notes, and snippets.

@leveled
Created December 17, 2021 18:39
Show Gist options
  • Save leveled/5d2058987cbc6e8c6f0817de79035ad5 to your computer and use it in GitHub Desktop.
Save leveled/5d2058987cbc6e8c6f0817de79035ad5 to your computer and use it in GitHub Desktop.
Find files affected by a commit from an id with Git
#programmatic way
$ git diff-tree --no-commit-id --name-status -r bd61ad98
index.html
javascript/application.js
javascript/ie6.js
#user facing way
$ git show --pretty="" --name-only bd61ad98
index.html
javascript/application.js
javascript/ie6.js
https://stackoverflow.com/questions/424071/how-do-i-list-all-of-the-files-in-a-commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment