[英]Merge branch 'master' Can't git pull
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. 要关闭它非常简单:同时按下Ctrl和X. 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.