I have two remotes configured, the origin (repository in heroku) and github (repository in github). In my local repository I made several changes but I gave the push only in the origin, leaving the github without updates and commits. Now I would like to know how do I "copy" the origin (heroku) direct to github.
The steps I took were as follows:
git clone [email protected]:meurepo.git meurepo
cd meurepo
heroku create
git remote add github [email protected]:meuusuario/meurepo.git
git push github
At first it said that there was no data to update and that the repository was already updated but I knew it was not. After some commands like git remote update
I tried to give git push github
again and now the following error appears:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:rodrigokiller/speedup.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.
I tried to give git pull
but the same error appears (from [rejected]).