If I define a git alias that executes an external script is there any way to get the original CWD? I know external scripts always execute at the root of the repo so I was just wondering if there was an env variable or something I could use to figure out where I ran my script.
Here is an example alias:
git config --global alias.here '!echo pwd `pwd`'
/home/me/repo/folder$ git here
pwd /home/me/repo
I'm looking for something that does the following:
git config --global alias.here '!echo pwd $OLD_PWD'
/home/me/repo/folder$ git here
pwd /home/me/repo/folder