星期日, 2月 05, 2017

[VSTS] Git command reference - Branches

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

目的:Create a new branch
git 語法:git branch branchname
Team Explorer 畫面:

[VSTS] Git command reference-Branches-01

目的:Swap to a different branch
git 語法:git checkout branchname
Team Explorer 畫面:

[VSTS] Git command reference-Branches-02

目的:Create and switch to a new branch
git 語法:git checkout -b branchname
Team Explorer 畫面:

[VSTS] Git command reference-Branches-03

目的:Delete a local branch
git 語法:git branch -d branchname
備註:Head 在該分支上的情況下,是無法刪除該分支
Team Explorer 畫面:

[VSTS] Git command reference-Branches-04

目的:Delete a remote branch
git 語法:git push origin --delete branchname
Team Explorer 畫面:

[VSTS] Git command reference-Branches-05

目的:Lock a branch, preventing updates to it
VSTS 畫面:

[VSTS] Git command reference-Branches-06

目的:Set a default branch in your Team Services/TFS repo
VSTS 畫面:

[VSTS] Git command reference-Branches-07

目的:Set a compare branch for pull requests in your Team Services/TFS repo
VSTS 畫面:

[VSTS] Git command reference-Branches-08

沒有留言:

張貼留言