Save Git Commit Changes to File

I’ve made some changes to my files in a git commit, and I want to keep track of all those changes so I can look at them in one file. What I need to do is save my commit changes to a file that I can look at while I work on a new change.

In order to handle this I will need to pipe the results of git diff to a file.

Go into Git bash or your terminal window

Goto the folder the commit was made

git diff HEAD^ HEAD > YourSavedFile.txt

This will send the results of git diff to your text file.

If you have another diff tool set up like kdiff or something else you will need to change your command to
git diff --no-ext-diff HEAD^ HEAD > YourDiffFile.txt

You may also like...