星期一, 2月 06, 2017

[VSTS] Git command reference - Commits

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

目的:Create a new commit
git 語法:git commit -m "message"
Team Explorer 畫面:

[VSTS] Git command reference - Commits-01
目的:Amend the last commit with staged changes
git 語法:git commit --amend -m "Updated message"
Team Explorer 畫面:

[VSTS] Git command reference - Commits-02

目的:Stage all file changes
git 語法:git add --all
Team Explorer 畫面:

[VSTS] Git command reference - Commits-03

目的:Stage a specific file change
git 語法:git add filename
Team Explorer 畫面:

[VSTS] Git command reference - Commits-04

目的:Review unstaged changes
git 語法:git status --untracked
Team Explorer 畫面:

[VSTS] Git command reference - Commits-05

目的:Delete a file
git 語法:
  • git rm filename
  • git commit -m "Deleted filename"
Team Explorer 畫面:

[VSTS] Git command reference - Commits-061

[VSTS] Git command reference - Commits-062

目的:Move a file
git 語法:
  • git mv filename
  • git commit -m "Moved filename"
Team Explorer 畫面:已事先把 class1 移到其他地方

[VSTS] Git command reference - Commits-071

[VSTS] Git command reference - Commits-072

目的:Tag a commit
git 語法:git tag -a tagname -m "description"
Team Explorer 畫面:

[VSTS] Git command reference - Commits-081

[VSTS] Git command reference - Commits-082

沒有留言:

張貼留言