Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a local Git repository have a different folder name than the version stored on Github?

Tags:

git

github

When using Git is it possible to use a different folder name on desktop than the project name on Github?

For example is there a way to accomplish this?

Github: /codeWars-someTest

Desktop: /someTest

In my case on the desktop the repo will already exist in a codeWars folder. /codeWars/sometest

like image 485
myNewAccount Avatar asked Sep 11 '25 22:09

myNewAccount


1 Answers

Yes, the root folder name has nothing to do with the GitHub repository name

cd /codeWars/sometest
git remote add origin https://github.com/<you>/codeWars-someTest

From there, you can add/commit and push: that will go into the GitHub codeWars-someTest repository.

like image 153
VonC Avatar answered Sep 13 '25 13:09

VonC