git本地master与远程master冲突解决

错误提示:

error: failed to push some refs to 'https://github.com/XXX/GitTest.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

 

解决:

(1)本地新建一个分支名字不要为master,改为其他任意名称即可。

(2)pull拉取GitHub上的文件,同步一下

(3)然后再把本地文件上传到服务端

你可能感兴趣的:(版本控制)