问题 When the head is at a particular commit, I want to get a diff file so that I can reduce the head to one more level down and then try the testing functionality with and without applying the diff file. So is there a way to generate a diff file of a specific commit. Even though there is a way to change the head before and after commit, this method comes more handy. 回答1: See the changes of a specific commit. $ git diff <commit-sha> -p OR, $ git show --decorate <commit-sha> # see 'Author', 'Date'