Search code examples
xcodegitpushcommit

Can't push on a remote git branch in Xcode


I come to you because I have this really annoying issue. In Xcode, I deleted some files and now, when I want to push my sources, it says that I can't since there is some uncommitted change. The uncommitted change come from the deleted files (Xcode shows me these files marked with a "d").

My question is how I make my git repo sync with it so I can push my sources?


Solution

  • You need to commit your changes before you push onto your remote. If you go to your project directory, type:

    git status

    It should show you the files which have been deleted. If it looks okay to you, type:

    git commit -a -m "your commit message here"

    Then you should be able to push to your remote repo:

    git push <remote> <remote_branch>