Machado
Machado

Reputation: 14499

Can't push from XCode to Github master branch

I created a new repository on github, modified the default readme file and then created a development branch to work on my project.

I have successfully commited and merged on development branch after it, sending all local modifications to github.

But when I try to push my local modifications to the master branch, XCode returns the following message:

The local repository is out of date

Make sure all changes have been pulled from the remote repository and try again.

And if I try to pull the changes..

enter image description here

How can I correctly push my project to the master branch?

Upvotes: 2

Views: 2686

Answers (1)

CodeWizard
CodeWizard

Reputation: 142642

You must do a git pull before you push to the server.
There are updates on the serer which you don't have on your repository.

git pull origin <branch
git push origin <branch>

When you try to push git verify that the latest commit from the server is in your local branch. if it does not - if you don't have it locally yo will be asked to pull the changes form the server before you can push your updates.

Upvotes: 3

Related Questions