0

Consider:

! [rejected]        master -> master (fetch first)
    error: failed to push some refs to 'https://github.com/dvtta/pinter.git'
    hint: Updates were rejected because the remote contains work that you do
    hint: not have locally. This is usually caused by another repository pushing
    hint: to the same ref. You may want to first integrate the remote changes
    hint: (e.g., 'git pull ...') before pushing again.
    hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131

1 Answers1

0

Problem reason

You are trying to push to the remote repository without already being in sync with it. So either pull first and then push to it....

do a git pull

and then do git push

The hard way to resolve this (Don't do it until you have to)

git push -f

The above command will however strip off the things that you are not in sync of. In other words all those commits that you don't have will be removed from the repo by this command.

So DON'T USE IT until you have to.

cafebabe1991
  • 4,928
  • 2
  • 34
  • 42