myNewAccount
myNewAccount

Reputation: 640

Can a local Git repository have a different folder name than the version stored on 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

Upvotes: 4

Views: 5628

Answers (2)

Ubong Ndoh
Ubong Ndoh

Reputation: 3

Yes, a repository does not have to be named the same, so far as the code in local machine has a git initialize in it. Then you mirror the folder in the local with the one in the GitHub repository.

Upvotes: -1

VonC
VonC

Reputation: 1329232

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.

Upvotes: 7

Related Questions