Git - 常见命令 -重命名本地分支并提交


git 重命名本地分支,并提交到远程

1.重命名 git branch -m oldBranchName newBranchName

2.删除远程分支:git push origin :oldBranchName

  1. 设置远程git仓库地址: git branch --set-upstream-to=origin/feat_addBizDateParam

3.将重命名过的分支提交:git push origin newBranchName

设置SSH的git链接

  1. git remote rm origin

  2. git remote set-url origin ssh://git@gitlab.prod.xxxxxx.cn:10022/xxxxxx-insight-web/xxxxxx.git
    fatal: No such remote 'origin'

  3. git remote add origin ssh://git@gitlab.prod.xxxxxx.cn:10022/xxxxxx-insight-web/xxxxxx.git


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM