URL used to clone a repo through git

So I have always used this style to clone my own repos from bash:

git clone https://github.com/User/Repo

Sometimes, though I see someone post a different URL used to clone a repo:

git clone https://github.com/User/Repo.git

Is there any difference in the URL? Does GitHub assume the .git ending if it is not specified?

1 Like

Hi @thesupremegod,

You are correct. While the standard Git URL ends in .git, cloning with the repository URL works because GitHub understands what the Git operation is trying to do when it reaches the controller.

Hope that helps. :slight_smile:

1 Like