我已将我的应用程序源(git repo)存储在文件夹中:
MyProject/front_app
但是在 GitHub 上,我希望将 repo 命名为 not front_app
but rather my_project_front_app
,有可能吗?
这是一个好方法还是更好地my_project_front_app
为这个 git repo 提供本地文件夹?
你可以做你想做的。本地和远程存储库可以有不同的名称。
如果您已经有一个本地存储库,则可以添加一个远程(根据需要命名):
git remote add origin http://distant/a_remote_repository
如果你已经有一个 GitHub 存储库,你可以将它克隆到你想要的本地文件夹中:
git clone http://distant/a_remote_repository a_different_local_folder
没有理由不能以不同的方式命名 GitHub 存储库、您的本地克隆和任何其他代码副本。除了您和您的合作者保持直截了当的能力之外,它没有真正的优势或劣势。
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