...
Code Block |
---|
|
$ cat GIT_TUTORIAL.txt
This is my first GIT File |
Code Block |
language 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)
...