5
I have two configured remotes, origin (Heroku repository) and github (github repository). In my local repository I made several changes but I gave the "push" only in origin, leaving github without updates and commits. Now I would like to know how do I "copy" the origin (Heroku) straight 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 he 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 again git push github
and now appears the following error:
! [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 the git pull
but the same error appears (from [Rejected]).
How was your pull? You need to set the remote and branch in the command
git pull github master
– LeoCBS
my pull was
git pull github master
.– Killer
If I give a
git push --force github master
there is some problem?– Killer