Sam
Sam

Reputation: 526

Problem with Source Control in Xcode 11.4

I have a remote repository in 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. enter image description here

But the last 2 commits are here. enter image description here

Upvotes: 1

Views: 198

Answers (1)

Swift Dev Journal
Swift Dev Journal

Reputation: 20088

Your git repository has a detached head, which means the repository has no current branch. Notice the blue folder shows a commit number in parentheses instead of master, the branch you selected in your first screenshot. 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. For more information on detached heads in git, see the following article:

Git Detached Head

Upvotes: 2

Related Questions