Finding all the checkins in a git branch (aka finding all the files with a commit)

Identifying files which have changed between two branches in git using the cygwin command line. (Note: I assume this works for any command line git tool).

1. If the files were checked in using windows there may be issues with line endings. To make your git command line ignore line ending differences in files perform the following:

In your git config file (in my case the path is \Repos\BI.EDW\.git\config) Add the following line in the [core] section with a tab first:

For example:

bare = false
repositoryformatversion = 0
filemode = false
symlinks = false
ignorecase = true
logallrefupdates = true

2. Then checkout one of the branches you would like to compare to using the following command:

git checkout "Release-15.5"

3. Run the git diff command with the name only switch and the name of the branch you want to compare to.

git diff --name-only "master"

This will give you a list of all files which were modified between the checkout branch and the branch listed in the git diff command. (In the example above the "Release-15.5" branch and the "master" branch.

Good luck!

Categorized as git Tagged ,

By Phil Steffek

Phil Steffek is a professional sumo wrestler who is hoping to represent the U.S. in the next Olympics. During the off season Phil is a Data Architect working on transactional databases, data warehouse implementations, and all aspects of business intelligence. Also, Phil is not really a sumo wrestler. You can get to know a bit more about my non-sumo doings by checking out my LinkedIn Page

Leave a comment

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