git Fatal: cannot do a partial commit during a merge
2014-12-03 17:02
309 查看
在提交单个文件的时候出现这个错误.
意思是不能部分提交代码.
原因是git认为你有部分代码没有做好提交的准备,比如没有添加
解决方法是
1. 提交全部
git commit -a
2. 如果不想提交全部,那么可以通过添加 -i 选项
git commit file/to/path -i -m "merge"
上述情况一般出现在解决本地working copy冲突时出现, 本地文件修改(手工merge)完成后,要添加并提交,使得本地版本处于clean的状态.
这样以后git pull就不再会报错.
意思是不能部分提交代码.
原因是git认为你有部分代码没有做好提交的准备,比如没有添加
解决方法是
1. 提交全部
git commit -a
2. 如果不想提交全部,那么可以通过添加 -i 选项
git commit file/to/path -i -m "merge"
上述情况一般出现在解决本地working copy冲突时出现, 本地文件修改(手工merge)完成后,要添加并提交,使得本地版本处于clean的状态.
这样以后git pull就不再会报错.
相关文章推荐
- [Git] Fatal: cannot do a partial commit during a merge
- Git- Fatal: cannot do a partial commit during a merge
- Git- Fatal: cannot do a partial commit during a merge
- [Git] Fatal: cannot do a partial commit during a merge
- [Git] Fatal: cannot do a partial commit during a merge
- Fatal: cannot do a partial commit during a merge
- cannot do a partial commit during a merge.
- cannot do a partial commit during a merge
- (转)Git冲突:commit your changes or stash them before you can merge. 解决办法
- Git冲突:commit your changes or stash them before you can merge. 解决办法
- Git创建问题-fatal: refusing to merge unrelated histories
- git合并分支或者push时,报错:“Please enter a commit message to explain why this merge is necessary,especi”的解决办法
- git中Please enter a commit message to explain why this merge is necessary.
- git中Please enter a commit message to explain why this merge is necessary. Please enter a commit mess
- android N7.1 下载fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle 解决方法
- git 使用场景一,pull报错:Auto Merge Failed; Fix Conflicts and Then Commit the Result.
- git pull 失败 ,提示:fatal: refusing to merge unrelated histories
- git 更新文件冲突Please, commit your changes or stash them before you can merge.
- git常见问题之:commit your changes or stash them before you can merge
- Git SourceTree Please, commit your changes or stash them before you can merge.