Skip to content

Instantly share code, notes, and snippets.

@jasonboukheir
Last active July 8, 2024 13:09
Show Gist options
  • Save jasonboukheir/3fdab92ece236744528447a4f7f5de00 to your computer and use it in GitHub Desktop.
Save jasonboukheir/3fdab92ece236744528447a4f7f5de00 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
@MarounMaroun
Copy link

Just use it as an alias. I use fish, I added:

alias git "git.exe"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment