2.6_branch

如下图,branch分支可以让我们在分支上做很多事情,如实验,而不影响主分支

git branch :查看当前有哪些分支

git branch (分支名称):创建新分支

git checkout (分支名称):切换到该分支上,始回到主分支用 git checkout master

git log --graph --oneline (master branchName):查看提交历史记录(参可不加)

git checkout -b new_branch_name == git branch new_branch_name & git checkout new_branch_name

你可能感兴趣的:(2.6_branch)