Git 推送本地分支至远程分支

Git 推送本地分支至远程分支,第1张

Git 推送本地分支至远程分支 总结一:本地创建本地分支并切换
# 针对当前cas-thymeleaf 创建一个cas 分支
Administrator@PC-20180603XCNG MINGW64 /d/git_workspace/cas-thymeleaf (main)
$ git branch cas

# 将当前cas-thymeleaf 由main 主分支切换至cas 分支
Administrator@PC-20180603XCNG MINGW64 /d/git_workspace/cas-thymeleaf (main)
$ git checkout cas
Switched to branch 'cas'

 总结二:本地本地分支推送远程分支
#推送本地的cas(冒号前面的)分支到远程origin的cas(冒号后面的)分支(没有会自动创建)
Administrator@PC-20180603XCNG MINGW64 /d/git_workspace/cas-thymeleaf (cas)
$ git push origin cas:cas
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: Create a pull request for 'cas' on GitHub by visiting:
remote:      https://github.com/zhouzhiwengang/springboot_demo/pull/new/cas
remote:
To github.com:zhouzhiwengang/springboot_demo.git
 * [new branch]      cas -> cas

 总结三:分支代码合并
git merge 分支名称

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5686645.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存