简体   繁体   English

合并分支'主'不能git拉

[英]Merge branch 'master' Can't git pull

hello I have linux mint and when I type and press enter terminal always show this dialog how can I fix this problem 你好,我有linux铸币,当我输入并按下输入终端总是显示此对话框,我该如何解决这个问题 在此输入图像描述

That's nano –a text editor–and it is used as default commit message editor in git. 这是nano -a文本编辑器 - 它在git中用作默认提交消息编辑器。 To close it is very simple: press Ctrl and X same time. 要关闭它非常简单:同时按下CtrlX. What you see in the screenshot is a commit message on a merge commit (because of the git pull ). 您在屏幕截图中看到的是合并提交中的提交消息(因为git pull )。

If you want to change it into another editor, you have to run: 如果要将其更改为其他编辑器,则必须运行:

git config --global core.editor "vim"

...and additionally set the GIT_EDITOR environment variable: ...另外设置GIT_EDITOR环境变量:

export GIT_EDITOR=vim

(put this in ~/.bashrc ) (把它放在~/.bashrc

The above will set vim as editor. 以上将vim设为编辑器。 If you want something visual, you may want to try gedit : 如果你想要一些视觉效果,你可能想尝试gedit

git config --global core.editor "gedit -w -s" 

In short 简而言之

CTRL-O CTRL-X

The long version: you have local and remote changes. 长版本:您有本地和远程更改。 Git pull merges origin/branch with your current branch. Git pull将origin / branch与您当前的分支合并。 Whey you do this, git wants to make a merge commit. 乳清你这样做,git想要进行合并提交。 You can type a commit message or simply use the default one (by typing the above commands) 您可以键入提交消息或只使用默认消息(通过键入以上命令)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM