I have stored my app sources (git repo) in folder:
MyProject/front_app
But on GitHub I want to have the repo named not front_app
but rather my_project_front_app
, is it possible to do?
Is it a good approach or it is better to have local folder my_project_front_app
for this git repo?
You can do what you want. The local and the remote repository can have different names.
If you already have a local repository, you can add a remote (named as you want) with:
git remote add origin http://distant/a_remote_repository
If you already have a GitHub repository, you can clone it in the local folder you want with:
git clone http://distant/a_remote_repository a_different_local_folder
There is no reason the GitHub repository, your local clone, and any other copy of the code couldn't be named differently. There's no real advantage or disadvantage to it, other than you and your collaborators' ability 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With