So, simply explaining my current situation:
- I kept pushing changes into origin master (no branches made yet)
- I decided to change the commit message of the initial commit of the Github Repository
- I did
$ git rebase -i --root
and change the commit message successfully I tried to force push by doing
$ git push --force
, but to get the following error:fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master.
I tried to follow the instruction, but to get:
! [rejected] master -> master (non-fast-forward) error: failed
to push some refs to 'git@github.com:BLAHBLAH.git' hint: Updates were
rejected because the tip of your current branch is behind hint: its
remote counterpart. Integrate the remote changes (e.g. hint: 'git pull
...') before pushing again. hint: See the 'Note about fast-forwards'
in 'git push --help' for details.
What am I doing wrong?