We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1)使用以下命令将本地master分支移到main: git branch -m master main 2)删除远程的master分支: git push origin --delete master 3)将远程main分支内容,合并到本地main分支: git pull origin main --allow-unrelated-histories (消除文件不一致导致的git pull错误) 4)将本地main推送到远程main: git push -u origin main
附: 推送本地分支local_branch到远程分支 remote_branch并建立关联关系
a.远程已有remote_branch分支并且已经关联本地分支local_branch且本地已经切换到local_branch git push b.远程已有remote_branch分支但未关联本地分支local_branch且本地已经切换到local_branch git push -u origin/remote_branch c.远程没有remote_branch分支并,本地已经切换到local_branch git push origin local_branch:remote_branch
参考链接: https://blog.csdn.net/torpidcat/article/details/81252505 https://blog.csdn.net/weixin_39737831/article/details/110411984
The text was updated successfully, but these errors were encountered:
No branches or pull requests
1)使用以下命令将本地master分支移到main:
git branch -m master main
2)删除远程的master分支:
git push origin --delete master
3)将远程main分支内容,合并到本地main分支:
git pull origin main --allow-unrelated-histories (消除文件不一致导致的git pull错误)
4)将本地main推送到远程main:
git push -u origin main
附:
推送本地分支local_branch到远程分支 remote_branch并建立关联关系
参考链接:
https://blog.csdn.net/torpidcat/article/details/81252505
https://blog.csdn.net/weixin_39737831/article/details/110411984
The text was updated successfully, but these errors were encountered: