ECM
ECM
总版主
总版主
  • 社区居民
  • 忠实会员
  • 原创写手
阅读:1380回复:0

error: failed to push some refs to git

楼主#
更多 发布于:2016-01-07 13:48
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://my_git_name@github.com':
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.

 

 

 

 

 

 

 

异常中心网是一家专门收集整理程序员编程过程中遇到的常见异常(exception)以及各种异常问答中心的网站。异常中心网旨在,减少程序员在编码遇到异常,处理各种异常时间和痛苦,让程序员能更愉快的、快速的定位异常并查找对应的异常解决方案。异常中心网诚心打造最完美的编程社区为程序员用户服务,努力成为最好的程序员乐园程序员社区程序异常中心程序bug中心异常问答中心

 

喜欢0 评分0
游客

返回顶部