简体   繁体   中英

XCode and Github

I'm trying to use git on an existing Xcode project by making a remote repo, but I can't push to it. I get this error: "The remote repository rejected commits. Make sure you have permission to push to the remote repository and try again.". I'm unsure why git makes the remote repo, but does not allow me to push. Could it be that my Xcode project is too large for the initial push?

The problem shouldn't be that your Xcode project is too large. You most likely are not allowed to push on the "master" branch because it is a protected branch. Is this your own remote repo or is someone else the owner?

If you want to push to the remote repo immediately, you can create your own branch off of master (if you are currently in the master branch) with

git checkout -b <branch_name>

To learn more about GitHub protected branches, check out GitHub Protected Branches

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM