在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的設置
git branch --set-upstream-to=origin/master master 
git branch --set-upstream-to=origin/ThirdParty ThirdParty
git config --global push.default matching

作者:在github上創建新分支


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM