码迷,mamicode.com
首页 > 其他好文 > 详细

在github上创建新分支

时间:2015-01-29 23:54:35      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:

在github上创建新分支 - guang11cheng的专栏 - 博客频道 - CSDN.NET

在github上创建仓库:
Create a new repository on the command line


touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/BrentHuang/MyRepo.git
git push -u origin master


在本地新建一个分支: git branch Branch1
切换到你的新分支: git checkout Branch1
将新分支发布在github上: git push origin Branch1
在本地删除一个分支: git branch -d Branch1
在github远程端删除一个分支: git push origin :Branch1 ? (分支名前的冒号代表删除)

直接使用git pull和git push的设置

git branch --set-upstream-to=origin/master master?
git branch --set-upstream-to=origin/ThirdParty ThirdParty
git config --global push.default matching

在github上创建新分支

标签:

原文地址:http://www.cnblogs.com/seven1979/p/4261184.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!