标签:variable 基础 switch 16px origin 查看 was string class
origin为远程仓库名
命令:git push origin local_branch:remote_branch
备注:此命令中,local_branch必须为你本地存在的分支,remote_branch为远程分支,如果remote_branch不存在则会自动创建分支;类似,git push origin :remote_branch,local_branch留空的话则是删除远程remote_branch分支。
分支操作基础命令:
$ git branch dev //创建本地分支 dev
$ git checkout dev //切换本地分支 dev
$ git checkout -b dev //相当于以上两条命令:创建 dev 分支并切换
Switched to a new branch ‘dev‘
$ git branch //查看本地分支
* dev
master
备注:git branch
命令会列出所有分支,当前分支前面会标一个*
号。
$ git branch -d dev //删除本地分支 dev
Deleted branch dev (was fec145a).
------------------------------------------------------
总结:
git branch
git branch <name>
git checkout <name>
git checkout -b <name>
git merge <name>
git branch -d <name>
------------------------------------------------------
持续更新..
标签:variable 基础 switch 16px origin 查看 was string class
原文地址:http://www.cnblogs.com/bbm7/p/7308765.html