How to fix this in git “This branch is out-of-date with the base branch”?

If you created the Pull Request from a branch in the same project repository, then:

  • make sure you’ve checked out your branch (the one from the PR): git checkout your-branch
  • with your branch checked out, you should do a git pull origin master
  • then git push origin your-branch to update the PR.

If you forked a repo, created a branch and submit the PR, follow these steps:

  • create a remote with the original project repo: git remote add upstream 'url.git.here'
  • make sure you’ve checked out your branch: git checkout your-branch
  • get the latest changes from the upstream to your-branch: git pull upstream master
  • after that, push the changes you’ve got from upstream: git push origin your-branch
  • finally, you can go to GitHub page to make sure no more out-of-date is blocking your PR.

After that, you should see that your PR is all good to be merge (after reviews is set).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)