GitHub for Windows has changed the way I’ve thought about Git. As a Windows user, the console commands native to Git always seemed a bit foreign. Before GitHub for Windows, I used Git Extensions in Visual Studio 2010. It was somewhat familiar, but still not as ‘obvious’ to use as the eventual GitHub for Windows client.
GitHub for Windows has a lot going on UI-wise. It’s WPF based with a very modern look that sometimes hides its functionality in obscure context menus that you find by right-clicking. That’s why I expected to find a menu option to change the local storage directory of a GitHub repo I was working with.
By default, GitHub for Windows does in fact have a configurable default storage directory.
So if I have a setting for a default storage directory, I must get a setting for each repository to change its actual storage directory if I wanted to, right? No, you don’t. After pondering this, and eventually figuring out the solution to this problem, I don’t really think this is a design flaw. I think it could somehow be on purpose. Either way, it took me quite a while to figure out how to change the local storage directory for a repo I cloned from GitHub.
Here’s how you do it. From GitHub for Windows right-click on the name of the repository you need to move. This will open a context menu where you need to choose ‘stop tracking this repo’.
Once your local clone of the repo isn’t tracked, switch down to the github area and click on the github id of the owner of the repo you need. In my case, it’s ‘justinsaraceno’. Doing this will display the available repos for cloning locally. Instead of pressing the clone icon/link on the repo, right-click on the repo name. This will bring up a context menu where you need to choose ‘clone to…’. Doing this will prompt you for the local file path you’d like to use.
Of course this could have all been avoided if you chose the ‘clone to…’ menu option when you first cloned the repo.