简体   繁体   English

Xcode 11.4 中的源代码管理问题

[英]Problem with Source Control in Xcode 11.4

I have a remote repository in GitHub.我在 GitHub 中有一个远程存储库。 I pushed several times and that was ok.我推了几次,没关系。 But now when I want to push something it doesn't do anything.但是现在,当我想推动某些东西时,它什么也没做。 Although it commits in the wrong place.虽然它在错误的地方提交。 My last 2 commits are "UI improvements" and "Add tab bar" It's my main branch.我的最后 2 次提交是“UI 改进”和“添加标签栏”这是我的主要分支。 在此处输入图像描述

But the last 2 commits are here.但最后 2 次提交在这里。 在此处输入图像描述

Your git repository has a detached head, which means the repository has no current branch.您的 git 存储库有一个分离的头,这意味着该存储库没有当前分支。 Notice the blue folder shows a commit number in parentheses instead of master, the branch you selected in your first screenshot.请注意,蓝色文件夹在括号中显示提交编号,而不是 master,这是您在第一个屏幕截图中选择的分支。 The last two commits were added to the repository but not to the master branch.最后两个提交已添加到存储库,但未添加到主分支。

Check out the master branch to fix the detached head.检查主分支以修复分离的头部。 Cherry pick the last two commits to move them to the master branch. Cherry 选择最后两个提交将它们移动到主分支。 For more information on detached heads in git, see the following article:有关 git 中分离磁头的更多信息,请参阅以下文章:

Git Detached Head Git 分离头

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM