GIT命令

远程仓库:

关联远程仓库:git remote add origin <仓库地址> 如:git remote add origin git@github.com:michaelliao/learngit.git

推送本地分支到远程:git push -u origin <远程分支> 如:git push -u origin master

克隆远程仓库:git clone <仓库地址> 如:git clone git@github.com:michaelliao/gitskills.git

分支管理:

  1. 创建与合并分支

查看分支:git branch

创建分支:git branch <name>

切换分支:git checkout <name>

创建+切换分支:git checkout -b <name>

合并某分支到当前分支:git merge <name>

删除分支:git branch -d <name>

 
原文地址:https://www.cnblogs.com/jimboi/p/8267261.html