Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for changing default directory missing #2889

Closed
AmarjeetBanwait opened this issue Sep 27, 2017 · 27 comments
Closed

Option for changing default directory missing #2889

AmarjeetBanwait opened this issue Sep 27, 2017 · 27 comments

Comments

@AmarjeetBanwait
Copy link

In new Github Desktop there is no option for changing default directory for cloning repos.

@AmarjeetBanwait AmarjeetBanwait changed the title Option for default directory missing Option for changing default directory missing Sep 27, 2017
@shiftkey
Copy link
Member

@AmarjeetBanwait whenever you change the location to create a new repository or clone an existing repository, this value is remembered and persisted to local storage. You're right in that we don't show this option as something explicit to change - we just automatically update this when it gets changed as part of your normal activities.

We talked about this in #67 and when someone asked about it earlier in #2106. Let me know if there's any further questions you have.

@LucDorpmans
Copy link

@shiftkey: I don't observe the behaviour you describe. Just added 5 repo's to a local drive with a different path than %UserProfile%\Documents\GitHub' and had to specify the location every time. I would like to specify the default location.

@iAmWillShepherd
Copy link
Contributor

iAmWillShepherd commented Mar 2, 2018

@LucDorpmans, please open a new issue for this.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 2, 2018
@desktop desktop unlocked this conversation Sep 27, 2018
@frumbert
Copy link

Mine always tries to clone into
/Users/tim/Documents/GitHub

whereas all my gits are stored in
/Users/tim/GitHub

changing it and performing a new clone still makes the default
/Users/tim/Documents/GitHub

I don't observer the behaviour described in #issuecomment-332415957

Why cant it be a settable option? Github desktop 1.5.0, macos

@annferracane
Copy link

Has this been fixed?

@vogtc3
Copy link

vogtc3 commented Mar 24, 2020

I’m not sure if this has been fixed but I do know that using the command line instead of desktop results in it being saved in the user folder instead of the iCloud documents folder on macOS

@edwardbattistini
Copy link

same here...

@some1new
Copy link

Why is it so difficult to give users an option to set default folder?

@habibieamrullah
Copy link

yeah I also need an option in GitHub Desktop to change default folder / path of my coding project.

@Tsubakura
Copy link

Same here. Consider the scenario where people might have 2 drives, it makes absolutely no sense to force people into using the smaller primary drive where Windows is installed, instead of a larger secondary drive.

It has been 3 years since this issue was made and I cant fathom as to why nobody thought of adding an option to set the default folder.

@ocervell
Copy link

+1, this is mandatory to have ! We don't want to browse to our Git location everytime we clone something !!!

@johnlewisdt
Copy link

Here we are, 4 years later nearly, with no action on this point. Small mercy is that you can create a new repo called 'now-theyre-microsoft-good-luck-with-support' and set it to users/me/github, then it remembers it next time.

@michael-crawford
Copy link

michael-crawford commented Jan 17, 2021

I have also been mystified why there's no preferences option to set this. It's not only really useful, it seems like a realoversight to not support such an obvious option, requested by many users. Is there some reason something that's likely very simple to implement is being ignored?

Ideally any preference should support variables which can be substituted from the GitHub URL. For example. I keep my repos outside of ~/Documents as I don't want my per-workstation changes to be replicated elsewhere via iCloud or OneDrive, as I'm using GitHub to coordinate.

So, my MacOS/Windows convention is:
~/Workspaces/${organization}/${repo}

However on Linux I use:
~/src/${organization}/${repo}
(with a symlink so ~/Workspaces also works, just more conventional to use src on linux)

Note I don't want to use .../GitHub/... as I used to also use SourceTree, some clients use GitLab, so want something generic. All have an organization parent.

Because sometimes I work with forks that exist under another organization with the same name, or I have both GitHub and some GitHub Enterprise sources, at a minimum, I'd like to have a way to grab the organization from the clone url and use that to modify the base.

Although I don't use it, it would be good to have a way to have per-source roots, in case there was a need to clone GitHub public website org/repo to a different base location than one or more internal GitHub Enterprise private org/repo code, as some of that code could be restricted by contract or very sensitive in nature, and need to go on a different drive or filesystem.

@vigji
Copy link

vigji commented Feb 1, 2021

This is just unbelievable. Such a simple addition, so many people asking it...would be amazing to have for me as well

@bmcmcm
Copy link

bmcmcm commented Mar 13, 2021

There should be an option to specify a default directory. Having the default location be in the currently logged on user's documents is a problem. I work in the context of a regular user account but frequently need to run code on an administrator console. Having the default location being in a user context results in having to navigate to a different user context in the file system to run the code during testing.

I cannot fathom why a default location cannot be specified.

@chenhajaj
Copy link

+1

@bhavisheythapar
Copy link

Would really like this option. +1

@Charles-Svg
Copy link

Can the default clone directory be modified with the Git comand line ?
That would solve my prob

@ecocarlisle
Copy link

Is there a workaround for this?

@steveward
Copy link
Member

Just to reiterate what was mentioned in the initial reply to this -- GitHub Desktop remembers the directory you previously cloned/created a repository to, so if you clone to ~/Code that directory will be selected by default the next time you clone/create a repository.

@ans-human
Copy link

Patiently waiting for the solution to this.

@pearson
Copy link

pearson commented Apr 28, 2021

While searching for an answer to the default directory question, the Google led me to this issue. What has been stated here seems to be correct (at least for me) and GitHub Desktop is remembering the previous directory I cloned a repository too. TBH, I wanted to move the GitHub directory, I looked at the settings in GitHub Desktop and didn't find a default directory option, and Googled right away -- it did not occur to me that the software would remember the previous directory.

That said, @shiftkey, given how many people are asking for it and given that the current functionality is a hidden feature, perhaps adding a default directory option to the settings would not be a bad idea? A UI that's obvious to the masses is a good thing. 😃

As well, perhaps there's some case where GitHub Desktop is not remembering the previous directory? There are a lot of "thumbs up" on comments stating that the software reverts to %UserProfile%\Documents\GitHub.

@LindsayMoir
Copy link

Still no option for this. Not very pythonic, that is for sure (sigh).

@nateGeorge
Copy link

It's possible, you need to change the directory when cloning a repo. Then all future repos will use that by default: https://stackoverflow.com/a/68474257/4549682

@nikhilagrawaldotnet
Copy link

I am on v2.9.0 (x64) and it worked as described by @shiftkey

  1. Tried to clone a repo.
  2. GH gave its default location.
  3. Cloned repo in my location.
  4. Cloned a new repo and it gave my location.

This worked without closing GH Desktop & also after closing and reopening GH Desktop.

Now, we have couple of solutions to close this -

  1. Give default location option (destination will be decided).
    image

  2. On the clone option, give additional info of this hidden feature.
    image

@bhavisheythapar
Copy link

The 2nd option would work.

@SPOOKEXE
Copy link

Yep definitely would like the second option, still non-existent to this day ;(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests