Alex Pelletier
Alex Pelletier

Reputation: 5123

Github Mac App How To Change Default Storage Directory

In the github mac app i am trying to change the default directory of one of my repo's. In the settings screen I only see a place to change the remote repo. enter image description here

Where do I need to go to change the default location? Sorry if it is very obvious.

Upvotes: 6

Views: 6706

Answers (3)

Douglas K
Douglas K

Reputation: 81

In the interest of users who came here with the same doubt, let me post also my experience.

I wanted to move the GitHub local folders away from the "Documents" folder to free up iCloud space, and because I really didn't need yet another copy of the codes in addition to the one in my machine and in the GitHub servers. That is how I landed in this page in the first place. So I simply moved the folders to a local folder that is not synchronised with iCloud and when I opened GitHub Desktop to confirm if things were working, the app told me "Couldn't local [repository X]." They had a "Locate..." button, which I used to let the app know where the new location was. And I did this for all of my locally cloned repos. That's it, works like a charm now. If you have a lot of repos cloned locally, it might be a one-time hassle to do this, but there's no further action.

Upvotes: 0

Alex Pelletier
Alex Pelletier

Reputation: 5123

So after some trial and error I figured out how to change the location after you have set it up. Apparently it is as easy as just moving the folder that contains the .git. So for example I just moved the website folder into a new directory and the GitHub app was able to track the movement.

Edit 1: The move does not always stick so you might have to try a couple of times.

Upvotes: 5

Brian Zelip
Brian Zelip

Reputation: 3191

You manage the local destination of each remote repository you clone at the moment of cloning.

As soon as you click the Clone in Desktop button on a repository's page (on github.com), GitHub for Mac should open up (assuming you've configured the app to be opened up when Clone in Desktop is clicked). When the app opens it first prompts you to choose the location for cloning the repo (cloning means downloading or copying the files). This prompt is where you set the default location for this particular repository on your local machine.

Upvotes: 3

Related Questions