简体   繁体   English

sublime text 2 - git 插件

[英]sublime text 2 - git plugin

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 "you@example.com"
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谢谢,稀有

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 需要知道作者和提交者的姓名和电子邮件。

As mentioned in kemayo/sublime-text-git issue 246 :kemayo/sublime-text-git问题 246 中所述

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

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 config commands.如果你已经安装了 msysgit,你会发现一个 git-cmd.bat 或者一个 git bash 会话的快捷方式,你可以在其中输入那些git config命令。

But , you also need to make sure that the Git plugin known where your HOME is, HOME being not set by default by Windows.但是,您还需要确保 Git 插件知道您的HOME位置,Windows 默认情况下未设置HOME

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. me@me-PC。 And by the looks of it, the sublime plugin have problem with parsing an invalid email.从它的外观来看,sublime 插件在解析无效电子邮件时存在问题。

Double check your email with:仔细检查您的电子邮件:

git config -l 

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

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