"The Local repository is out of date"....i have no branch how to solve this

I had the same issue I solved it like that :

first go to the Project directory in your terminal

git init
git add .
git stash save
git branch --set-upstream-to=origin/master
git pull -r
git stash pop
git push 

let me know if it works


that warning is because someone else would have pushed to your repo after the last time you pulled from it. you will need to pull from the repo, merge your code and then you will be able to push again


I had the same issue and it happened because I added the README.md file from the GitHub website by creating another branch to add it. Xcode does not pull changes made through the website automatically.

So you have to go to Xcode menu and select Source Control -> Pull.

enter image description here

And then I checked "Rebase local changes onto upstream changes", this applies local commits one at a time. I had many commits I didn't push, so I chose this.

enter image description here

Tags:

Git

Xcode8