在 sourcetree 中提交存储库时出错,Git 窗口客户端
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21487091/
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
errors while committing the repository in sourcetree, Git window client
提问by Dingling
I am new to bitbucket, git and sourcetree. i created a repository on bitbucket, then i installed the sourcetree client for win 7, then i clone that repository with my local desktop folder, then i placed a file in the local folder, now when i try to commit the changes, sourcetree give me following errors.
我是 bitbucket、git 和 sourcetree 的新手。我在 bitbucket 上创建了一个存储库,然后我为 win 7 安装了 sourcetree 客户端,然后我用我的本地桌面文件夹克隆了该存储库,然后我在本地文件夹中放置了一个文件,现在当我尝试提交更改时,sourcetree 给我以下错误。
git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -F C:\Users\shahjahan_khokher\AppData\Local\Temp\vrkvrvyu.uba
*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 'shahjahan_khokher@shahjahan_khokh.(none)')
Completed with errors, see above.
git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -FC:\Users\shahjahan_khokher\AppData\Local\Temp\vrkvrvyu.uba
*请告诉我你是谁。
跑
git config --global user.email "[email protected]" git config --global user.name "你的名字"
设置您帐户的默认身份。省略 --global 以仅在此存储库中设置身份。
致命:无法自动检测电子邮件地址(得到 'shahjahan_khokher@shahjahan_khokh.(none)')
已完成,但有错误,请参见上文。
how can i resolve this issue and do a successful commit and push.
我如何解决这个问题并成功提交和推送。
回答by Ben
The easiest way to solve the issue with your identity without using Git Bash is to set it in SourceTree directly: -
在不使用 Git Bash 的情况下解决身份问题的最简单方法是直接在 SourceTree 中进行设置:-
- Got to menu: Tools -> Options
- On the general tab fill in the Full Name and Email address fields
- Click the OK button
- Commit your files :)
- 进入菜单:工具 -> 选项
- 在常规选项卡上填写全名和电子邮件地址字段
- 单击确定按钮
- 提交你的文件:)
回答by Dingling
I got the solution for above mentioned problem, with the help of my friend , Solution is
我得到了上述问题的解决方案,在我朋友的帮助下,解决方案是
First get the Git Bash command line in ur system by installing Git from Download Git for Windows
Then open Git Bash from start manu - Git - Git Bash and run these commands
首先通过从Download Git for Windows安装 Git 在你的系统中获取 Git Bash 命令行
然后从 start manu 打开 Git Bash - Git - Git Bash 并运行这些命令
git config --global user.email "[email protected]" git config --global user.name "Your Name"
git config --global user.email "[email protected]" git config --global user.name "Your Name"
Now try to commit again, problem will be resolved.
现在尝试再次提交,问题将得到解决。
回答by Fahad
This is what you need
这就是你所需要的
Simple and precise.
简单而精确。
https://confluence.atlassian.com/display/BITBUCKET/Set+up+Git+and+Mercurial
https://confluence.atlassian.com/display/BITBUCKET/Set+up+Git+and+Mercurial