Push rejected Push to origin/master was rejected
时间: 2023-11-25 12:27:24 浏览: 175
idea上传代码到github时遇到的Push rejected: Push to origin/master was rejected
5星 · 资源好评率100%
This error message usually means that Git is not able to push your changes to the remote repository because there are conflicts between your local branch and the remote branch.
To resolve this issue, you can try the following steps:
1. Pull the latest changes from the remote repository and merge them into your local branch:
```
git pull origin master
```
2. Resolve any conflicts that arise during the merge process.
3. Once the conflicts are resolved, commit the changes and try pushing again:
```
git commit -m "Resolved conflicts"
git push origin master
```
If these steps don't work, you may need to contact the repository owner to get permission to push changes.
阅读全文