[ACCEPTED]-Github repo name and local folder name for repo-github

Accepted answer
Score: 24

You can do what you want. The local and 6 the remote repository can have different 5 names.

If you already have a local repository, you 4 can add a remote (named as you want) with:

git remote add origin http://distant/a_remote_repository

If 3 you already have a GitHub repository, you 2 can clone it in the local folder you want 1 with:

git clone http://distant/a_remote_repository a_different_local_folder
Score: 2

There is no reason the GitHub repository, your 5 local clone, and any other copy of the code 4 couldn't be named differently. There's no 3 real advantage or disadvantage to it, other 2 than you and your collaborators' ability 1 to keep it straight.

git clone <url> <path> ;# path is a variable; it's the url that's well-defined
git remote add <name> <url> ;# as can be seen in the 'git remote add' command

More Related questions