我有一个相对干净的安装Mac OS X Mavericks 10.9运行git版本1.8.5.1; 我的文件在已安装的SMB共享上,我无法再使用我的GIT存储库,因为NULL字节(\ 0)不断出现在我的所有版本控制文件中......甚至在动态生成的文件中也是如此通过GIT.
git commit -m "Test message"手工打字,给我:
error: a NULL byte in commit log message not allowed.
fatal: failed to write commit object
Run Code Online (Sandbox Code Playgroud)
如果我尝试git commit改为,则pico视图中显示的默认提交消息如下所示:
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch feature/centos_support
# Your branch is up-to-date with 'origin/feature/centos_support'.
#
# Changes to be committed:
# modified: README.md
# …Run Code Online (Sandbox Code Playgroud) 我刚刚阅读了写好的提交消息并且非常喜欢它.问题是,我更喜欢命令行(plain ole' git).
我已经让我的.vimrc以非常酷的方式满足了我的需求,而且我已经习惯了.这就是为什么当我的不同快捷方式和绑定不像git commit vim那样工作时,我总是感到困惑.
有没有办法使用我的普通vim配置?为什么这与普通的vim有所不同?这不使用我当地的vim编辑器吗?
根据这个问题,我已经将vim设置为标准编辑器.
谢谢!
更新
我使用的是Mac OS X Sierra.
:version在git vim里面返回正确的文件'$HOME/.vimrc'.
更新2
我其实是在使用Neovim.但我将VISUAL设置为'nvim',但它仍然不起作用.
我尝试更改 Git 的本机代码编辑器,但没有成功。现在,每当我尝试恢复提交时,都会收到以下错误:
hint: Waiting for your editor to close the file... notepad++.exe -wl1: notepad++.exe: command not found
error: There was a problem with the editor 'notepad++.exe -wl1'.
Please supply the message using either -m or -F option.
Run Code Online (Sandbox Code Playgroud)
我想知道如何重置或删除我所做的尝试修改。
我试图通过使用以下命令提交所有更改
git commit -a
Run Code Online (Sandbox Code Playgroud)
注意:我想提交没有任何"提交消息"
但是当我执行上面的命令时它会显示下面显示的屏幕,我不知道如何离开这个屏幕来完成我的提交.

我最近安装了Vim.现在,当我以交互模式重新分支我的分支时,Git会自动打开Vim.
但是,我不想以交互模式打开Vim; 相反,我想打开默认的Git交互模式编辑器.如何设置Git使用的默认交互式编辑器?
当我键入 git commit 命令来提交文件时,我收到以下错误消息:
Microsoft Visual Studio:微软:找不到命令
错误:核心编辑器“Microsoft Visual Studio”存在问题。
请使用 -m 或 -F 选项提供消息。
Despite similar questions that have been posted in the community, I have not seen this specific question addressed.
I am trying to change the default text editor used by git to Sublime. I am using a Windows machine and downloaded Sublime 3.
Initially, I was running the command git config --global core.editor "'C:\\Program Files\\Sublime Text 3\\sublime_text.exe' -n -w" in Git Bash, then when I ran a git commit it did not open an editor (it just used the Git Bash …
我在nettuts easy git guide上关注简单的git指南
我在我的~/目录中初始化了一个空的git实例,然后添加了我.vimrc和我的.vim/文件.
git add .vimrc
git add .vim
Run Code Online (Sandbox Code Playgroud)
但是,当我执行git commit命令时,我最终得到了似乎无关的错误消息.
sayth@linux-kt34:~> git commit
Error detected while processing /home/sayth/.vimrc:
line 203:
E319: Sorry, the command is not available in this version: py << EOF
line 204:
E492: Not an editor command: import os.path
line 205:
E492: Not an editor command: import sys
line 206:
E492: Not an editor command: import vim
line 207:
E15: Invalid expression: 'VIRTUAL_ENV' …Run Code Online (Sandbox Code Playgroud) 因此,我遇到了一个错误,内容是“请输入提交消息来解释为什么需要进行此合并,特别是如果它将更新的上游合并到主题分支中”,我在此线程中找到了解决方案。
然而答案之一说,你的文本编辑器是问题所在,所以将其更改为 Atom,并且在不知道如何在 Atom 中使用编辑器的情况下,我通过以下代码将 git 编辑器更改为 Atom:
git config --global core.editor "atom --wait"
Run Code Online (Sandbox Code Playgroud)
我正在使用 Git Bash,我想回到它作为我的核心编辑器,但我似乎找不到一种方法来做到这一点。
PS 我刚接触 Git 几天,所以请原谅我犯的任何基本错误。
git ×9
vim ×3
git-commit ×2
github ×2
text-editor ×2
atom-editor ×1
config ×1
git-bash ×1
git-commands ×1
git-revert ×1
macos ×1
markdown ×1
neovim ×1
repository ×1
smb ×1
sublimetext3 ×1
windows ×1