Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

git - Cygwin and 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...

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

TortoiseGit is optimized for Git for Windows.

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

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

1) Select the [CYGWIN-INSTALL-PATH]in-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:UsersUSERNAME"). 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.

Based on https://tortoisegit.org/docs/tortoisegit/tgit-dug-settings.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...