星期五, 2月 10, 2017

[VSTS] Git command reference - Undo

了解該篇文章 Git command reference 的 Undo 說明並記錄

目的:Revert all changes and roll back to the most recent commit
git 語法:git reset --hard HEAD
Team Explorer 畫面:

[VSTS] Git command reference-Undo-01


目的:Revert staging of files, but keep file changes
git 語法:git reset --mixed HEAD
Team Explorer 畫面:

[VSTS] Git command reference-Undo-02

目的:Delete untracked files
git 語法:git clean -
Team Explorer 畫面:

[VSTS] Git command reference-Undo-03

目的: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 畫面:

[VSTS] Git command reference-Undo-04

目的:Revert a commit pushed to a remote repository
git 語法:git revert commitID
Team Explorer 畫面:

[VSTS] Git command reference-Undo-05

沒有留言:

張貼留言