< YALU STUDIO >

PyCharm Git Push rejected: Push to origin/master was rejected

Word count: 69 / Reading time: 1 min
2018/10/02 Share

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:

  1. Go to the root directory of the project

  2. Right click, choose ‘Git Bash here’

  3. Use command

  4. 1
    git pull origin master --allow-unrelated-histories

    Edit file

  5. Use command

    1
    git pull origin master
  6. Try commit & push again

CATALOG
  1. 1. Solution: