sublime text 2 - git 插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15001319/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 08:12:23  来源:igfitidea点击:

sublime text 2 - git plugin

gitsublimetext2

提问by Wowzaaa

I bought and installed Sublime text 2 on windows 7 I also installed the Git plugin

我在 Windows 7 上购买并安装了 Sublime text 2 我还安装了 Git 插件

Now, I added a file to the staging index and it worked ... git status also works ... git commit on the other hand doesn't:

现在,我向暂存索引添加了一个文件,它起作用了……git status 也起作用了……另一方面,git commit 不起作用:

This is what i get:

这就是我得到的:

*** Please tell me who you are.

Run

git config --global user.email "[email protected]"
git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'me@me-PC.(none)')

I do not know how to fix this.

我不知道如何解决这个问题。

thanks, Rares

谢谢,稀有

回答by VonC

You can type those commands in a git-cmd session or a git bash session.

您可以在 git-cmd 会话或 git bash 会话中键入这些命令。

Git needs to known the author and committer name and email.

Git 需要知道作者和提交者的姓名和电子邮件。

If you have installed msysgit, you will find a git-cmd.bat or a shortcut to a git bash session, in which you will be able to type those git configcommands.

如果您安装了 msysgit,您将找到一个 git-cmd.bat 或一个 git bash 会话的快捷方式,您可以在其中键入这些git config命令。

But, you also need to make sure that the Git plugin known where your HOMEis, HOMEbeing not set by default by Windows.

但是,您还需要确保 Git 插件知道您的HOME位置,HOMEWindows 默认情况下未设置。

回答by Daniel Magnusson

What did you set your email to?

你把你的电子邮件设置为什么?

fatal: unable to auto-detect email address (got 'me@me-PC.(none)')

致命:无法自动检测电子邮件地址(得到 'me@me-PC.(none)')

According to the error msg the email is; me@me-PC.And by the looks of it, the sublime plugin have problem with parsing an invalid email.

根据错误消息,电子邮件是;me@me-PC。从外观上看,sublime 插件在解析无效电子邮件时存在问题。

Double check your email with:

仔细检查您的电子邮件:

git config -l