git pushでエラーが出た時

エラー内容

 ! [rejected]        branch1 -> branch1 (non-fast-forward)

error: failed to push some refs to 'git@github.com:***/***.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.

 

原因

リモート側で変更があったから

 

解決方法

$ git pull origin ブランチ名