Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8115993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:40:07+00:00 2026-06-06T03:40:07+00:00

When I clone a repository, is there any difference between these two URLs? Without

  • 0

When I clone a repository, is there any difference between these two URLs?

  1. Without .git extension:

    git clone http://foo/repo
    
  2. With .git extension:

    git clone http://foo/repo.git
    
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:40:10+00:00Added an answer on June 6, 2026 at 3:40 am

    The convention is that the .git extension should be used for bare repositories, and left off of directories with a working tree. Git doesn’t really care, but has a few convenience methods that make this fairly transparent.

    For example, if you have a repository named /tmp/foo.git and you call git clone file:///tmp/foo, Git will first try to find /tmp/foo. If it doesn’t exist, it will try /tmp/foo.git instead.

    This does not work the other way around. If your directory is named /tmp/foo and you try to clone from /tmp/foo.git you will be told:

    fatal: ‘/tmp/foo.git’ does not appear to be a git repository

    Most of the HTTP/HTTPS functionality is from your web server, not Git. Even if you’re using Smart HTTP transport, I suspect most of the magic happens in a server-side LocationMatch directive. Theory aside, some quick tests against GitHub show that it works the same way as the SSH and Git procotols in that respect, but your mileage may vary on other web servers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a Python way without using a subprocess to clone a git repository?
Possible Duplicate: Is there any way to clone a git repository’s sub-directory only? clone
Git clone will clone remote branch into local. Is there any way to clone
is there any way to clone my mercurial repository to a separate machine ?
When trying to clone ANY repository via https from github, we get: git clone
This question assumes there's a blessed central repository that members of a team clone
I can't clone my repository via http: abort: ' http://MYREPO ' does not appear
I recently used git-svn to clone an SVN repository, for the purposes of maintaining
I'm trying to use git on windows to clone a remote repository. I can
In the code below I am trying to clone a git repository to another

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.