Git – Saving the entire git diff between two commits in a text file

diff()git

is there a way where I could save the entire difference between two diff in a text file?

Suppose I wanted all the changes between A1 and A10 on master branch.

--A11-A10-A9-A8-A7-A6-A5-A4-A3-A2-A1-master

Or, is there a way where I could get the entire diff in Terminal which I could copy+paste?

Best Answer

Sure:

git diff A10..A1 > my.diff