我在master分支上尝试了git push,但是它只显示我有新的请求请求,但是当我单击新的请求请求时,需要我比较更改,但没有显示任何将这些更改添加到存储库的选项.它只显示我所做的更改.
I tried git push on master branch but it just shows that I have new pull request but when I click on new pull request it takes me to comparing changes but doesn't show any option to add those changes into repository. It only shows changes I made.
但是当我输入命令
git push origin main所有添加到我的存储库中的文件.
all files where added to my repository.
但是当我这样做
git push origin master它不起作用.为什么?听说他们用main代替master.那么将来他们会删除主人吗?
it doesn't work. Why is it? I heard they are replacing master with main. So in future are they going to remove master?
推荐答案
GitHub致力于替换术语"master",使用主要"等中性术语为了避免不必要地提及奴隶制,
GitHub is working on replacing the term "master" on its service with a neutral term like "main" to avoid any unnecessary references to slavery,
您可以在此处阅读更多背景信息,以了解进行更改的原因: www.zdnet/article/github-to-replace-master-with-alternative-term-to-avoid-slavery-references/.
You can read here for more background the reason for the change here: www.zdnet/article/github-to-replace-master-with-alternative-term-to-avoid-slavery-references/.
关于将分支从主分支重命名为主分支,有很多准则.例如: jarv.is/notes/github-rename-master/.
About renaming your branch from master to main, there are a lot of guidelines. For example: jarv.is/notes/github-rename-master/.
git branch -m master main \ git push -u origin main \ git remote set-head origin main更多推荐
Github中的主分支和主分支之间的区别?
发布评论