Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode error message "The remote repository rejected commits" when pushing to Github

Tags:

git

github

xcode

I have a branch named develop that I pulled on, added some code, committed, pulled again, and am now trying to push but I get the following error message in Xcode:

The remote repository rejected commits.
Make sure you have permission to push to the remote repository and try again.

I switched to a different branch named feature and was able to pull and push on it fine.

I went to Xcode > Preferences > Accounts > Repositories then clicked on the repository I'm working on and verified my credentials and even re-entered them. But I still have the same problem (the feature branch works but the develop one throws up that message).

Why does the push work on one branch but not the other?

like image 558
TenaciousJay Avatar asked Dec 18 '22 17:12

TenaciousJay


1 Answers

I got this error today and it wasn't until I tried to commit via another method did I actually find the reason. I had a file that was 230Mb and GitHub doesn't allow files that big (or at least for the account I have). So Xcode just wasn't being very helpful with its error message

like image 184
Flexicoder Avatar answered May 19 '23 00:05

Flexicoder