Git使用中出现的错误以及解决办法积累

1.问题情境:昨晚上在上传代码的时候,commit代码之后没有进行push就放在那里,今天修改了新的模块之后,上传代码时出现了以下错误:git

commit is not possible because you have unmerged filesapp

hint: Fix them up in the work tree,
hint: and then use 'git add/rm <file>' as
hint: appropriate to mark resolution and make a commit,
hint: or use 'git commit -a'.
fatal: Exiting because of an unresolved conflict..net

缘由分析:新修改功能后的文件与原来commit未push的文件存在冲突,须要将修改后的文件手动加入到文件push队列中。blog

解决办法: 使用git add [filename] 将差别文件添加进去。也能够先使用git status (git status命令能够列出当前目录全部尚未被git管理的文件和被git管理且被修改但还未提交(git commit)的文件.)查看差别文件,而后按照本身的需求进行操做。队列

关于git status 参考:http://blog.csdn.net/hudashi/article/details/45080721it

相关文章
相关标签/搜索