What use is the *.git extension when cloning a git

2019-06-04 07:36发布

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?

标签: git github ssh
1条回答
Emotional °昔
2楼-- · 2019-06-04 08:06

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')

查看更多
登录 后发表回答