github上的版本和本地版本冲突的解决方法

2018-06-29  本文已影响0人  吹洞箫饮酒杏花下

在github上创建项目,然后本地git init

然后没有git pull -f --all

然后git add .  | git commit -am "init"

导致github上的版本里有readme文件和本地版本冲突,下面给出冲突原因:

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.

j解决: git push -u origin master -f

上一篇下一篇

猜你喜欢

热点阅读