How to make ‘git diff’ ignore comments

Here is a solution that is working well for me. I’ve written up the solution and some additional missing documentation on the git (log|diff) -G<regex> option. It is basically using the same solution as in previous answers, but specifically for comments that start with a * or a #, and sometimes a space before the … Read more

How to list only file names that have changed between two branches

This command will diff their whole history: git diff branch1..branch2 –name-only If you want to compare from their last common ancestor, then: git diff branch1…branch2 –name-only And now you can grep files that you want. From there it’s easy to write a little shell script that diffs two branches, file by file. filenames=$(git diff branch1…branch2 … Read more