Professional Documents
Culture Documents
git status
git diff
ls
cd test
ls
git add committed.js
git diff --staged
git log --pretty=format:"%h %an %ar-%s"
git show
----------------------------------------
#Rebase Conflict
-------------------------------------------
#Undo Changes
cd test
vi hello.py
#(press i then make file as below)
print("Hello world")
#(then press es and type :wq)
git add hello.py
git commit --amend
#(type :wq)
vi hello.py
#(press i)
print("Hello world")
Adding bug tofile
#(press esc and type :wq)
git checkout --hello.py
vi hello.py
#(press esc and type :wq)
git add hello.py
git reset hello.py
git add hello.py
git reset --hard
vi hello.py
#(press i and make)
print("Hello world")
print("Added bug to script")
#(press esc and type :wq)
git add hello.py
git commit -m 'changed hello.py'
git reset HEAD~1
git commit -am "commit to revert"
git revert HEAD
git revert HEAD...HEAD~3 --no-edit