Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
$ cat GIT_TUTORIAL.txt
This is my first GIT File
  • Skip staging and Commit
language
Code Block
Panel
bash

$

echo

"Understanding

the

DIFF

command

in

git"

>>

GIT_TUTORIAL.txt


$

git

commit

-a

-m

"Understanding

Diff"


[master

e58dbad]

Understanding

Diff 1 file

Diff
 1 file changed,

1

insertion(+)

  • Whoops, we forgot something on that commit, and now?
Panel

$ git log
commit e58dbad79723a437fbcade50bebe4a3ddeb18794
Author: Rafael Possas <rafael.possas@sydney.edu.au>
Date: Fri May 26 11:42:26 2017 +1000

    Understanding Diff

commit c7d8e7ac9608dde2868b1e6bd1eaee222fbeba8b
Author: Rafael Possas <rafael.possas@sydney.edu.au>
Date: Fri May 26 11:22:05 2017 +1000

    My first git commit


$ less cat GIT_TUTORIAL.txt
This is my first GIT File
Understanding the DIFF command in git


$ git reset --soft HEAD^


MOVE TO COMMIT BEFORE HEAD (In this case our FIRST commit) 

...