Skip to content

Instantly share code, notes, and snippets.

@akramarev
Last active January 26, 2019 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akramarev/adfd1aa04d366c1708a8906db07086a8 to your computer and use it in GitHub Desktop.
Save akramarev/adfd1aa04d366c1708a8906db07086a8 to your computer and use it in GitHub Desktop.
[git for wsl] Makes git faster on WSL #wsl #osreinstall
#!/bin/bash
# WSL 'git' wrapper, save as /usr/local/bin/git and chmod a+x
# https://github.com/Microsoft/WSL/issues/981#issuecomment-363638656
REALPATH=`readlink -f ${PWD}`
if [ "${REALPATH:0:5}" == "/mnt/" ]; then
git.exe "$@"
else
/usr/bin/git "$@"
fi
#!/bin/bash
# WSL 'go' wrapper, save as /usr/local/bin/go and chmod a+x
# https://github.com/Microsoft/WSL/issues/981#issuecomment-363638656
REALPATH=`readlink -f ${PWD}`
if [ "${REALPATH:0:5}" == "/mnt/" ]; then
go.exe "$@"
else
/usr/bin/go "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment