I'm still learning Git and GitHub and I haven't been able to figure this out so far. I found a public repository on GitHub that I wanted to try editing, so I forked the repository and then cloned it so I'd have a local copy of the files to work with. I had to search for a while online to figure out where exactly Git puts the local files, but I ended up finding the files in their respective subfolders under C:\Users\\Documents\GitHub (I have Windows 7 -- for other versions of Windows the files are apparently in C:\Documents and Settings\< current_user>).
When setting up GitHub I was able to select a repository location, but apparently that location only affects repositories I create, not repositories I clone. I wanted to try and figure out a way to change the default cloned directory location, but it sounds like the only way to do this is to change the HOME environment variable. However, changing an environment variable that could also affect other programs does not sound like best practice so I'm hoping there's another way.
I found one way to do this by simply specifying the desired path every time I enter a clone command, like this:
git clone https://github.com/username/example.git c:/other/path/to/repo
Is there a way to do this without modifying the HOME environment variable and without typing it out every time (which invites typo errors), or is specifying the location in the command line probably the best way?
EDIT: I'm using the GitHub for Windows GUI and Powershell.
cmd.exe
. – Derivative