Bir taahhütten yeni taahhütlere geçiş yapan devletler
0. last commit,i.e. HEAD commit
1. Working tree changes, file/directory deletion,adding,modification.
2. The changes are staged in index
3. Staged changes are committed
Durum geçişi için eylem
0->1: manual file/directory operation
1->2: git add .
2->3: git commit -m "xxx"
Farkı kontrol et
0->1: git diff
0->2: git diff --cached
0->1, and 0->2: git diff HEAD
last last commit->last commit: git diff HEAD^ HEAD
Son işleme geri dön
2->1: git reset
1->0: git checkout . #only for tracked files/directories(actions include modifying/deleting tracked files/directories)
1->0: git clean -fdx #only for untracked files/directories(action includes adding new files/directories)
2->1, and 1->0: git reset --hard HEAD
Hiçbir şeyi yeniden indirmeden git klonuna eşdeğer
git reset && git checkout . && git clean -fdx