How to change git path from C:\cygdrive\c\

和自甴很熟 提交于 2019-12-08 01:54:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!