GitHub clone default directory
已回答
How do I change GitHub clone default directory, it decided to change to a random repo and then when I cloned without noticing the directory (that now no longer exists) inside the repo of the other repo, instead of just [User]/documents/GitHub. Cloning a repo into [User]/documents/GitHub does not change the directory it wants to clone to.
请先登录再写评论。
Could you confirm how you manage your cloning? Do you use the IDE or GitHub Desktop? Also you mentioned you that the current default directory is [User]/documents/GitHub, you would like to change that?
Best regards,
Uros Glogovac
IntelliJ Support
It sounds like your Git clone path got stuck on a previous directory, which sometimes happens if GitHub Desktop or your terminal remembered an old location. The easiest fix is to manually reset the default folder.
If you’re using GitHub Desktop, go to:
File → Options → Advanced → Default Clone Directory
and set it back to your preferred path (for example, [User]/Documents/GitHub). After saving, all future clones should go to that directory.
If you’re cloning through the terminal, just navigate to the folder you actually want before running the clone command:
cd ~/Documents/GitHub
git clone https://github.com/user/repo.git
Once you clone from the correct location at least once, GitHub Desktop will also usually remember the updated path.
This should get everything back to normal.