Posted By

satie83 on 06/21/12


Tagged

files git commit


Versions (?)

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


 / Published in: Bash
 

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

Hash of the commit which you want to show a303aa90779efdd2f6b9d90693e2cbbbe4613c1d

  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)

Report this snippet  

You need to login to post a comment.