了解該篇文章 Git command reference 的 Undo 說明並記錄
目的:Revert all changes and roll back to the most recent commit
git 語法:git reset --hard HEAD
Team Explorer 畫面:
目的:Revert staging of files, but keep file changes
git 語法:git reset --mixed HEAD
Team Explorer 畫面:
目的:Delete untracked files
git 語法:git clean -
Team Explorer 畫面:
目的:Reset your local branch to the most recent commit on a remote branch
git 語法:git reset --hard remote/branchname (for example, git reset --hard origin/master)
Team Explorer 畫面:
目的:Revert a commit pushed to a remote repository
git 語法:git revert commitID
Team Explorer 畫面:
![[VSTS] Git command reference-Undo-01](https://c1.staticflickr.com/1/626/32610577292_3ab7944155_z.jpg)
![[VSTS] Git command reference-Undo-02](https://c1.staticflickr.com/1/671/32640499071_d2f4bf36e1_z.jpg)
![[VSTS] Git command reference-Undo-03](https://c1.staticflickr.com/1/259/32610577062_a321c9e4c8_z.jpg)
![[VSTS] Git command reference-Undo-04](https://c1.staticflickr.com/1/408/31920889514_fdc8a5cf67_z.jpg)
![[VSTS] Git command reference-Undo-05](https://c1.staticflickr.com/1/666/32610576872_6c3fcd6386_z.jpg)
沒有留言:
張貼留言