我最近在全新的 Windows XP 安装上安装了 Cygwin 以及 Git 二进制文件和 TortoiseGit 的副本。我似乎能够通过 TortoiseGit 执行大多数 Git 操作,例如查看日志等,但是当我通过 TortoiseGit 提交时,我收到此消息...
error: unable to create temporary sha1 filename : No such file or directory
我可以通过命令行提交 - 我只是似乎无法通过 gui 界面提交!
最佳答案
TortoiseGit 针对 Git for Windows 进行了优化。
但是,从 TortoiseGit 1.8.13.0 开始,Cygwin git 也可以与 TortoiseGit 一起使用。
您必须在 TortoiseGit 设置中按如下方式配置它:打开 TortoiseGit 设置对话框并打开常规页面。
1) Select the [CYGWIN-INSTALL-PATH]\bin-folder as git.exe folder.
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) Configure AutoCrLf, this is necessary as TortoiseGit and Cygwin Git have different defaults. The default in Cygwin Git is true.
4) Go to TortoiseGit the section called “Advanced Settings” and set CygwinHack to true in order to activate cygwin workarounds.
5) Reboot.
基于 https://tortoisegit.org/docs/tortoisegit/tgit-dug-settings.html
关于git - Cygwin 和 TortoiseGit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3850236/