When I tried to commit and push to my GitHub repository, it shows the error below:
1 | Push rejected: Push to origin/master was rejected |
Solution:
Go to the root directory of the project
Right click, choose ‘Git Bash here’
Use command
1
git pull origin master --allow-unrelated-histories
Edit file
Use command
1
git pull origin master
Try commit & push again