git的两条神奇命令

随手记

 

出现:refusing to merge unrelated histories 

用它:$git pull origin master –allow-unrelated-histories

 

出现:Threre is no tracking information for the current branch . Please specify which branch you want to merge with。

用它:git branch --set--upstream master origin/master

还不行的话尝试用它:git branch --set--upstream-to master origin/master

 

进入commit 编辑模式 后,退出的方法: 冒号+w+q。

 

 

posted @ 2018-11-13 14:52  q彩虹海q  阅读(8)  评论(0)    收藏  举报