git เป็นการละทิ้งการเปลี่ยนแปลงภายในระบบ
# Discarding local changes (permanently) to a file:
git checkout -- <file>
# Discard all local changes to all files permanently:
git reset --hard
เลิกทำ unstaged เปลี่ยนแปลง git
git checkout -- .
git ปรับค่าแฟ้มเดียว
git checkout HEAD -- my-file.txt
git เป็นการละทิ้ง unstaged แฟ้ม
git stash save --keep-index --include-untracked
git ยกเลิกการเปลี่ยนแปลงทั้งหมด
git reset --hard
ลบการเปลี่ยนแปลงภายในระบบ git
git fetch # will fetch the latest changes on the remote
git reset --hard origin/master # will set your local branch to match the representation of the remote just pulled down.