Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 7
    To show the changes of the last commit, simply use git show ;) Commented Mar 25, 2021 at 16:02
  • @xeruf that does only shows the commit message for me. Commented May 29, 2023 at 11:57
  • this worked for me, my issue was I had not pushed my commit yet, and I had forgotten exactly which keyword I had changed in a file. git diff <file> showed nothing. (due to 'committed' changes) git diff HEAD~1 is what I needed. it showed me all local changes, not just with the file I was looking at. But it got the job done. Commented Jul 25, 2024 at 15:19