msysgit - git --git-dir not working in windows -


in hook script git, trying run command this..

please refer to(git --git-dir not working expected)

git log --name-status --git-dir="c:\documents , settings\user\my documents\visual studio 2008\projects\cms\.git" --work-tree="c:\documents , settings\user\my documents\visual studio 2008\projects\cms" 

when run command getting following error.

fatal: not git repository (or of parent directories): .git 

is there thing wrong in command using?

since hook script, use posix paths, in bash session, not windows paths.

git log --name-status --git-dir='/c/documents , settings/user/my documents/visual studio 2008/projects/cms/.git' --work-tree='/c/documents , settings/user/my documents/visual studio 2008/projects/cms' 

from dos session (as in "not hook), path might have looked like:

git log --name-status --git-dir='c:/documents , settings/user/my documents/visual studio 2008/projects/cms/.git' --work-tree='c:/documents , settings/user/my documents/visual studio 2008/projects/cms' 

alternative syntax (not tested): "c:\\xxx\\yyy\\..."


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -