I use git-svn on windows for the first time , git svn rebase
show error:
fatal: index file open failed: Invalid argument
Why it happened and how can i fix it ?
Thanks.
If you are using msysgit on windows, there is a regression on msysgit1.8.4 for git-svn
.
It seems to appear when executed in a CMD, not in a bash shell, so you can try that same command in a shell.
Or you can SubGit , which is much more complete and robust tool for transitionning from svn to git repo. Listen to his author at GitMinutes #22 .
The regression is in progress to be fixed (currently -- October 2013 -- in the ' next
' branch of the git repo ) Bas Bossink confirms in the comments :
I just verified that it is fixed in git 1.8.5.2.msysgit.0
See commit 7fbd42 , by jiangxin :
Tvangeste found that the "
relative_path
" function could not work properly on Windows if "in" and "prefix" have DOS drive prefix (such as "C:/windows"). ( $gmane/234434 )Eg, When execute:
test-path-utils
,relative_path "C:/a/b" "D:/x/y"
should return "C:/a/b
", but returns "../../C:/a/b
", which is wrong.So make relative_path honor DOS drive prefix.
I was seeing this problem when using --separate-git-dir with working directory and git directory on separate drives (git on a network drive in my case). As a workaround I've confirmed that you can use mklink (run as admin) to map the target drive: mklink /d "C:\\temp\\my-git-dir" "D:\\my-git-repo\\"
Then something like the following will produce a viable repo and working dir. git clone --no-hardlinks repo_url --separate-git-dir=D:/my-git-repo C:/temp/my-working-dir
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.