Can I rename a repository without renaming the folder in which it resides? (I’m using GitHub Desktop version 2.1.0 on macOS.)
I can create two repositories, both named “abc”, which are located at, for example, ~/wxyz/abc and ~/mno/pqr/stu/abc. I can see them in GitHub Desktop, both are named “abc”.
I would like to be able to distinguish between the two of them in GitHub Desktop by having one named “abc in wxyz” and the other named “abc in stu” (or “abc-in-wxyz” and “abc-in-stu” or similar) without renaming the folders themselves. Is that possible?
If it can’t be done in GitHub Desktop, can it be done using the command line? This isn’t something I’d do very often, so either would be OK with me.
Thanks for the request @jkbullard. Unfortunately at this time there is not a great way to differentiate between multiple repositories with the same name in GitHub Desktop short of renaming the local folder. We’ve been working on improving repository organization in https://github.com/desktop/desktop/issues/6460 – there is a lot of discussion and feedback in that thread you can read through. Please feel free to add any additional feedback that you have there.
Hello. Ended up on that thread when searching for, well, the same thing. Since I found a solution that works for me, I thought I’d share it. Note that I’m on Windows so that may work a bit differently on Mac.
You simply have to make a junction of your repository and point GitHub Desktop toward it.
You can name the junction however you want while keeping the original folder intact. (And if you happen to use VS Code, the workspace will be named after the junction, which is nice too.) The caveat is that you will have to remove your repository and add it again if you want to “rename it”.
Also, note that it has to be a junction – symbolic links will not work.