问题
How to change git path from C:\cygdrive\c... to C:\ or just \cygdrive\c\?
I have setup notepad++ as my editor for git. When i try to perform an interactive rebase (git rebase -i), notepad opens but cannot find the right files for rebasing due to this weird path that include C:\cygdrive\c...
Here is an image of the error message that notepad++ shows...
回答1:
Make sure to:
- use bash:
C:\cygwin64\bin\bash.exe --login -i
- use cygpath to convert Unix and Windows format paths:
That is:
/cygdrive/c/Program\ Files\ \(x86\)/Notepad++/notepad++.exe $(cygpath.exe -w "$*")
But for using that for an interactive rebase, you need to follow "Cygwin git passing wrong path to my editor for commit messages" and wrap that line in a shell script.
来源:https://stackoverflow.com/questions/49863588/how-to-change-git-path-from-c-cygdrive-c