git - Cygwin 和 TortoiseGit

标签 git cygwin tortoisegit

我最近在全新的 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/

相关文章:

bash - 我怎样才能让 awk 为它解析的每个文件处理 BEGIN block ?

c++ - 在 Windows 下使用 Eclipse CDT 和 Cygwin

unity-game-engine - TortoiseGit 和 UnityYAMLMerge

git - TortoiseGit 保存用户身份验证/凭证

git - 你能在 Git 中执行代码卡住吗?

git clone 没有对象做 git log

git push 在 MacOS Sierra 10.12.5 中失败

git - 我们如何通过git在windows上使用linux命令?

cygwin - 如何使用 cygwin 创建联结?

git - 从 git 获取干净的文件副本