GIT – List modified files between revisions

As a GIT user, I need to know what files are modified between revisions before uploading it to a live server where no sort of revision control is possible. Since I do a lot of small commits, revision range will be several commits away from HEAD, before it gets into production.

First, we need to know the revision id. If we are using the latest, then the end range id is obviously HEAD. To get the start range ID, I use gitk and look for the start commit and look for the sha1 commit id. Once I get the Id, listing the modified files is simple as:

git diff --name-only startid HEAD
# or for non head
git diff --name-only startid endid

Then you will get a long list of files modified between those revisions.

This entry was posted in GIT and tagged , , , , , , . Bookmark the permalink.

Related Posts

One Response to GIT – List modified files between revisions

  1. Pingback: SVN – List Modified Files Between Revisions | Lysender's Daily Log Book

Leave a Reply

Your email address will not be published. Required fields are marked *