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.1k views
in Technique[技术] by (71.8m points)

windows 7 - Git "unable to determine absolute path of git directory"

I'm a git newbie and am having problems trying to get the latest version of a remote project:

S:devprjmyprj [master]> git pull
/usr/libexec/git-core/git-sh-setup: line 266: cd: .git: No such file or directory
Unable to determine absolute path of git directory

It was working fine until today and strangely I don't think I've changed anything since it last worked fine.

This is on Windows 7. My project is on an encrypted drive (S:) and git is on C:

S:devprjmyprj [master]> git --exec-path    
C:UsersmattAppDataLocalGitHubPortableGit_656cc1ef6d04f06ddf8b2f5bedbac921caed3b62/libexec/git-core

Manually doing a cd to the exec directory above works fine (even though there are mixed slash types).

Any ideas how to even start working out what has gone wrong?

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

Killing the ssh-agent.exe process works for me.
Note: It is called sh.exe in newer versions of SourceTree (thanks @cowlinator)


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

...