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 7749773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:07:22+00:00 2026-06-01T11:07:22+00:00

I am fairly new to Git and trying my best to find some documentation

  • 0

I am fairly new to Git and trying my best to find some documentation on this problem to no avail.

Here’s my command:

$ git submodule add https://github.com/joliver/EventStore.git externalsource/JOliverEventStore/ 

fatal: Not a git repository: ../.git/modules/externalsource/JOliverEventStore
Unable to checkout submodule ‘externalsource/JOliverEventStore’

I am in my root of my repo and there is currently no directory for /externalsource/JO
liverEventStore/
. The error is talking about a directory that I have no knowledge of.

If I add the submodule to the root dir like this:

$ git submodule add https://github.com/joliver/EventStore.git JOliverEventStore 

I have no problem and it creates the folder in the root directory.

Any insight would be greatly appreciated.

  • 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-01T11:07:23+00:00Added an answer on June 1, 2026 at 11:07 am

    It can depends on the version of Git you are using: this recent thread (February 2012) mentions a bug:

    Since recently a submodule with name <name> has its git directory in the .git/modules/<name> directory of the superproject while the work tree contains a gitfile pointing there.

    When the same submodule is added on a branch where it wasn’t present so far (it is not found in the .gitmodules file), the name is not initialized from the path as it should.
    This leads to a wrong path entered in the gitfile when the .git/modules/<name> directory is found, as this happily uses the – now empty – name.
    It then always points only a single directory up, even if we have a path deeper in the directory hierarchy.

    But more generally, uses the <path> argument of git submodule:

    <path> is the relative location for the cloned submodule to exist in the superproject.

    • If <path> does not exist, then the submodule is created by cloning from the named URL.
    • If <path> does exist and is already a valid git repository, then this is added to the changeset without cloning.
      This second form is provided to ease creating a new submodule from scratch, and presumes the user will later push the submodule to the given URL.

    eoinoc mentions in the comments another cause, which is detailed in the question “git status returns fatal: Not a git repository but .git exists and HEAD has proper permissions“.

    My repo’s location had changed, and I needed to update git’s configuration files.

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

Sidebar

Related Questions

Fairly new to Spring, so I'm having some trouble with this. I'm trying to
fairly new Android developer here. I've come across a strange problem that I'm not
I am fairly new to Git, and I am having a problem with doing
I'm fairly new to git and was wondering best practices when deploying to production?
I'm fairly new to both Git and Ruby, but I'm wondering if this situation
fairly new to C# here... ...What I'm trying to do is parse a bunch
fairly new iPhone developer here. Building an app to send RS232 commands to a
Fairly new to Objective C and trying to work within Storyboards given it's the
I fairly new to JQuery and perhaps trying to achieve something that might be
I am fairly new to Git and am curious if anyone sees an issue

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.