Skip to content

Instantly share code, notes, and snippets.

@lexnewgate
Forked from jasonboukheir/git
Created January 30, 2023 07:05
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 lexnewgate/7f334b8a83def380febbe4ef2ba9bb73 to your computer and use it in GitHub Desktop.
Save lexnewgate/7f334b8a83def380febbe4ef2ba9bb73 to your computer and use it in GitHub Desktop.
git when in unix, git.exe when in wsl
#!/bin/sh
if pwd | grep /mnt/c > /dev/null; then
exec git.exe "$@"
else
exec /usr/bin/git "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment