GIT - List all the files for a commit (or various commits) in git


/ Published in: Bash
Save to your folder(s)

Hash of the commit which you want to show a303aa90779efdd2f6b9d90693e2cbbbe4613c1d


Copy this code and paste it in your HTML
  1. git show --pretty="format:" --name-only a303aa90779efdd2f6b9d90693e2cbbbe4613c1d
  2.  
  3. git show --pretty="format:" --name-only a303aa90779efdd2f6b9d90693e2cbbbe4613c1d | grep '\.php$' // If you want to filter the result, only with condition files...
  4.  
  5. git show --pretty="format:" --name-only bc54bc02ff9ce087cb49db78011ac64384f47327 ad67f71575010e6645b71c57b56537612b454125 | sort -u // We show all the files of various commits
  6. without repeated files (sort -u)

URL: http://stackoverflow.com/questions/424071/how-do-i-list-all-the-files-for-a-commit-in-git

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.