Cygwin和TortoiseGit [英] Cygwin and TortoiseGit

查看:392
本文介绍了Cygwin和TortoiseGit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在新的Windows XP安装中安装了Cygwin以及Git二进制文件和TortoiseGit的副本。我似乎能够通过TortoiseGit做大多数Git操作,如查看日志等,但是当我通过TortoiseGit提交,我收到这个消息...

I have recently installed Cygwin along with the Git binaries and a copy of TortoiseGit on a fresh Windows XP install. I seem to be able to do most Git operations through TortoiseGit such as viewing the logs etc, but when I come to commit via TortoiseGit I get this message...


错误:无法创建临时sha1
文件名:没有此类文件或目录

error: unable to create temporary sha1 filename : No such file or directory

通过命令行提交 - 我只是看起来不能通过gui界面提交!

I am able to commit via the command line - I just dont seem able to commit through the gui interface!

推荐答案

TortoiseGit针对Git Windows。

TortoiseGit is optimized for Git for Windows.

但是,从TortoiseGit 1.8.13.0开始Cygwin git也可以用于TortoiseGit。

However, starting with TortoiseGit 1.8.13.0 Cygwin git can also be used with TortoiseGit.

在TortoiseGit设置中配置如下:打开TortoiseGit设置对话框并打开General页面。

You have to configure it as follows on TortoiseGit settings: Open TortoiseGit settings dialog and open the General page.


1)选择[CYGWIN-INSTALL -PATH] \bin-folder作为git.exe文件夹。

1) Select the [CYGWIN-INSTALL-PATH]\bin-folder as git.exe folder.

2)在Windows中配置HOME环境变量,使Cygwin
和TortoiseGit正在使用相同的主目录和全局
git-config。在这里使用正常的Windows符号(例如
C:\Users\USERNAME)。默认情况下,TortoiseGit使用通常位于c:\Users下的Windows home
目录,Cygwin使用位于
下的
自己的主目录[CYGWIN-INSTALL-PATH] \\ \\ home。

2) Configure the HOME environment variable in Windows, so that Cygwin and TortoiseGit are using the same home directory and global git-config. Use the normal Windows notation here (e.g., "C:\Users\USERNAME"). By default, TortoiseGit uses the Windows home directory which is normally located under c:\Users and Cygwin uses its own home directories which are located under [CYGWIN-INSTALL-PATH]\home.

3)配置AutoCrLf,这是必要的,因为TortoiseGit和Cygwin Git
有不同的默认值。

3) Configure AutoCrLf, this is necessary as TortoiseGit and Cygwin Git have different defaults. The default in Cygwin Git is true.

4)转到TortoiseGit的高级设置部分,并将
CygwinHack设置为true以激活cygwin解决方法。

4) Go to TortoiseGit the section called "Advanced Settings" and set CygwinHack to true in order to activate cygwin workarounds.

5)重新启动。

基于 https://tortoisegit.org/docs/tortoisegit/tgit-dug-settings.html

这篇关于Cygwin和TortoiseGit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆