I'm trying to create a fully portable version of git on a USB drive with it's own SSH keys and I want it to work regardless of the drive letter windows gives it. I've installed portable git and most of it works. The problem I have is setting the $HOME to be dynamic I want it to point to /DRIVELETTER/PortableApps/PortableGit so when I generate and use my SSH keys it will go to /DRIVELETTER/PortableApps/PortableGit/.ssh/
Right now $HOME is / and it makes the default path for ssh generation //.ssh/id_rsa which doesn't exist. I have found site that say "SET IT TO /e/bla/bla/bla/" but that doesn't work if the drive letter is J.
I have not found any good guides to setting up truly portable git.
Thanks for any help Munchies
In a batch file first do
for /F "delims=\: usebackq" %%i in (`cd`) do SET USB_DRIVE=%%i
then the rest of the time (in batch files) use %USB_DRIVE% instead of d: or
whatever letter it is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With