GitHub Desktop - how to change default storage directory? - github

I am using GitHub Desktop on Windows, and want to change the directory where cloned repositories go by default (currently %USER%\Documents\GitHub\).
I have looked at this question from 8 years ago in which OP is using the GitHub for Windows GUI, but that's apparently not the same as GitHub Desktop because none of the answers work for me. Alt-T does nothing, and I can't find default storage directory in global options or in repository settings. Also, the shortcut to GitHub Desktop starts in a different directory altogether, so modifying that would be no use.
I know that I can use the command line to git clone to any directory, but it would just be nice if one could configure the desktop version to do that as well.
Does anyone know of a way to change the default directory for cloned repos that works in the current version of GitHub Desktop?

The way to do this now is to change the folder when cloning it in the GUI:
Click on the repo to clone, then change the initial path in the 'Local path' area. After that, it should use that location as the default. Any easy way to get the folder you want is to copy it from the address bar in a file browser:

Related

What happens if I change the folder path of my github project on mac?

I git clone an empty repository on my desktop. I did some commit and push operations. Now I want to change the folder location on my pc, but I don't want to break the connection to github. Should I take some actions before changing the path? Thank you for your help.
I know that for windows users they can change the .git, but I don't know what should be done for mac.

When using the builtin settings sync on vscode, where are the actual files?

I'm using the builtin setting sync with vscode (not the extension), I've successfully synced, yet I do not see the actual files anywhere through github. Do these files exist somewhere that is accessible through github?
From what I can tell the files are not accessible through github, obviously they are at the root of the repo in .vscode/, but I'd love to actually see the backed up version.
The way I handled this with vim was to add a source command in the .vimrc, then link that to it's own github repo.
I guess I'll have to just trust that github and vscode have it handled

Flutter project from GitHub

This might be a simple question but I am not able to get around it. I have a Flutter project in my Windows 10 machine and checked in to my private repository in GitHub via Android Studio.
Now I want to create a same working environment on another Windows 10 or Mac. My question is, how can I checkout the project and work on it as it is missing the supported files like .metadat, project_name.iml etc?
Below image shows what I have in the github right now.
This is more of a git question than anything else. If you have files locally that you need to have exactly the same on another machine, you should check those in. If those files are in the .gitignore file in your project, that might be for a good reason, but if you really want to sync them, you should remove them from the .gitignore and, for each file, git add -f [the file], then commit and push those files.

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.
Where do I need to go to change the default location? Sorry if it is very obvious.
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.
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.
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.

How do I change my local directory in eclipse to work with git?

Long story short I moved my local project to the root of my web server. In doing so I've lost my connection to the local git files.
Here is the location of my Working Directory after pulling the source down from git.
C:\Users\Administrator\git\SiteName
subfolders are:
.git
android
website
My local webserver no longer has an android or website dierctory, but instead the contents of website are simply in htdocs.
Is it possible to reference the structure on github but keep my local files in eclipse in a different area, so I can once again merge and push files?
You can tell EGit to point to a local git repo from the Git Repositories view. Once EGit knows where your repo is, it can import projects from that repo. You can work on them in eclipse, but they point to the repo external to the workspace.
You could create symlinks to the files in the "website" directory inside your htdocs. That may or may not be what you want, since, all changes will be immediately reflected on the front end.
While importing a project, eclipse allows you to create symlinks to the files without copying them into the workspace. It's an option that appears after you click the "Advanced" button in the import dialog box. This should allow you to keep the files wherever you like, and still use them in eclipse.