today i have a small advice for you if you work with the git bash on windows.
To quickly convert paths from windows format to unix format you can use the cygpath tool:
Unix to windows:
$ cygpath -w /d/temp D:\temp
Windows to unix:
$ cygpath -u 'D:\temp' /d/temp
Another nice tool that helps you with the conversion of an relative path is realpath. This is useful because it allows your scripts to accept relative paths and than figure out the absolute paths themselve.
$ ls test.txt $ realpath -s ./test.txt /d/realpathtest/test.txt
When you give an absolute path to realpath it will just print this path. So if you are working with file paths, this will make your scripts more flexible.
$ realpath -s /d/realpathtest/test.txt /d/realpathtest/test.txt
Top comments (0)