0

how do I compare the changes with my current non-commited state with the previous commited state a88a9?

this is my current git status, there has been changes since my last commit

$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit

how do I compare the changes with my current non-commited state with the previous commited state a88a9?

This is my commits

$ git log --pretty=oneline
a88a937d3154291d77156fce2e6c3a0b932c4e6d add the --done! part in the index.html
3a5c6a881a67664b365a8eddb1c6f0ddd44099b6 css for .priority-btn
32365dfdf27264691929eac8b5d1e9260a367802 css for .edit-btn
e3d040a11e1363447ad8953453c4284c9dd097eb remove TodoMVC readme
dd721f439355b3aa6ce1add52e2b35e51dec5cdb init
$

this does with a diff on one commit with another, which I got from here, but I want to compare with my current non committed state.

$ git diff a88a937d 3a5c6a8

Am I right to say HEAD is the current working state or is it the last commit?

alroc
  • 27,574
  • 6
  • 51
  • 97
HattrickNZ
  • 4,373
  • 15
  • 54
  • 98
  • Possible duplicate of [how show the diff from my current working directory and my last commit?](http://stackoverflow.com/questions/14035068/how-show-the-diff-from-my-current-working-directory-and-my-last-commit) – Andrew C Feb 04 '16 at 02:52
  • this is what I use `git diff HEAD` from [here](http://stackoverflow.com/questions/39460097/how-to-see-whats-changed-between-last-commit-and-nowafter-making-some-changes) – HattrickNZ Mar 14 '17 at 00:51

1 Answers1

0

If you just do git diff a88a9 it will compare commit a88a9 to what you currently have local in your repo.

Dom
  • 1,687
  • 6
  • 27
  • 37