当前位置:
首页 >
在github上创建新分支
发布时间:2025/6/15
35
豆豆
生活随笔
收集整理的这篇文章主要介绍了
在github上创建新分支
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
在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的设置
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上创建新分支的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: Firebug入门指南
- 下一篇: 专为设计师而写的GitHub快速入门教程