从SSH中克隆git仓库时,* .git扩展名有什么用? [英] What use is the *.git extension when cloning a git repo from SSH?
问题描述
常见于GitHub和SO(导入现有源代码到GitHub ):
git@github.com:/youruser/somename.git
vs
git@github.com:/ youruser / somename
我不小心加了一个git远程没有* .git扩展名,它工作正常。我推荐一个新的分支后才注意到它。
是否需要* .git扩展?
.git
') Commonly seen on GitHub and here on SO (Import existing source code to GitHub):
git@github.com:/youruser/somename.git
vs
git@github.com:/youruser/somename
I accidentally added a git remote without the *.git extension and it worked fine. I only noticed it after pushing up a new branch.
Is there any need for the *.git extension?
No, you can skip the .git
: the git repository hosting service (here GitHub, but you would find the same with gitolite, GitLab or Gitorious) usually knows how to find the full repository path from its name alone (without '.git
')
这篇关于从SSH中克隆git仓库时,* .git扩展名有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!