GIT(3)----问题汇总

1、git pull出现的合并问题:

Please enter a commit message to explain why this merge is necessary,especially if it merges an updated upstream into a topic branch

a、解决办法1:

Ctrl+K+H for help. I pressed that and saw a menu. Ctrl+K+D. Then give the file name and enter followed by Ctrl+K+X to exit. Once you go into the help you will have a menu which tells you what to do.

b、解决办法2:

Actually it's not an error! It means you should enter some message to mark this merge. My OS is Ubuntu 14.04.If you use the same OS ,you just need to do this as follows: 1. type some message; 2. "Ctrl+C+O"; 3. type the file name(such as "Merge_feature01") and press Enter; 4. "Ctrl+X" to exit; Now if you go to .git and you will find the file "Merge_feature01", that's the merge log actually.

 

c、参考资料:

Please enter a commit message to explain why this merge is necessary,especially if it merges an updated upstream into a topic branch

 

2.、git pull出现冲突confict问题

问题描述:

error: Your local changes to the following files would be overwritten by merge:
    a/cd.txt
Please, commit your changes or stash them before you can merge.
Aborting

解决方法:

git fetch --all  
git reset --hard origin/master 

 

posted @ 2016-03-01 10:43  horsetail  阅读(428)  评论(0编辑  收藏  举报