error: failed to push some refs to git

1692 단어 errorgitpush
error message:
~/my_project/ $ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Username for 'https://github.com': my_git_name
Password for 'https://[email protected]': 
To https://github.com/my_git_name/server-app.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/my_git_name/server-app.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

method:
~/my_project/ $ git pull

then merge all the conflict file 
delete conflict code all the project
then you can add commit message for this merge.
~/my_project/ $ git commit -m 'msg'

at last, you need git push this commit to remote.
~/my_project/ $ git push

that's all.

좋은 웹페이지 즐겨찾기