赞
踩
在实际工作过程中有可能当天的工作没有提交,而其他人的都提交了,所以在当你再提交的时候就因为master版本不同而无法提交。
出现无法push的原因也可能是git add . 以后没有git commit 也会出现这种问题。可以先直接使用命令:git status 查看是否没有commit
先从远程master中将最新版本pull下来,然后合并到自己的分支中:
git pull origin master
会发现有可能你本地的版本没有改变,无论如何pull都无法改变本地的分支,此时执行以下命令:
git status
查看是否为有文件没有commit
git add .
git commit -m '提交'
git push origin 分支名
再次 pull
git pull origin master
解决冲突后
git
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。