Learn Courses My Dashboard

Can't push files to GitHub

You’re then best

1 Like

I had the same symptoms as Diane, but thought I had resolved it. However I just received the same error again from Xcode when trying to Push. This time I only had made minor changes to my code since the last successful commit/push.

Is there any chance that you could provide the Terminal commands that you used to push the code for Diane so that I can try that?

If you already have a repo created and it’s connected to the repo in GitHub, in terminal you will need to:

  1. Navigate to your project using cd

  2. git status Will show you if there are any changes

  3. If so, commit those changes

  4. git push remoteName branchName

Thanks for the speedy response Mikaela.

Took a couple of attempts as I had to use the full address, but that helped:
git push https://github.com/ownerMe/remoteRepositoryName localBranchName

That sounds like the remote isn’t setup.
You should set it up with this command

git remote add remoteName url