0

I am trying to push a blazor project to github. I ran pull then push but it keeps asking me to run pull first. I did that multiple times and nothing changed. I looked at this link but didn't get any answers that fixed my problem. Thanks.

horrible
  • 117
  • 1
  • 8
  • 1
    It's not vscode error. There is some change in remote server to which you are trying to push. Before you push, pull the remote change, merge to your branch and then push. – karikevinod Jul 14 '20 at 17:45
  • 5
    Does this answer your question? [Can't push refs to remote try running pull first to integrate your changes](https://stackoverflow.com/questions/59790948/cant-push-refs-to-remote-try-running-pull-first-to-integrate-your-changes) – MLavrentyev Jul 14 '20 at 17:53

1 Answers1

1

When you local branch and your remote branch are at different commit histories, you need to rebase and then push:

git pull --rebase origin branchname
git push origin branchname
Vivek Prajapati
  • 109
  • 1
  • 4
  • The question is a duplicate and the original already has an [answer](https://stackoverflow.com/a/59791227/8634018) that recommends the same action as you do. Thus I'm recommending deletion, sorry! – Dominik Mokriš Feb 07 '22 at 07:23