githubにpushでエラー

github1にpushしようとすると以下のエラーが出た

error: failed to push some refs to 'git@github.com:myrepo'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.

remoteリポジトリとlocalリポジトリが衝突しているようなので、
remoteリポジトリのコードをpullしてマージで解決する

$ git branch tmp
$ git checkout tmp
$ git pull origin +master:tmp
$ git checkout master
$ git merge tmp
$ git push -u origin master