deltanovember
deltanovember

Reputation: 44061

Why is my git submodule command not working with Bitbucket?

I'm trying to add a submodule

https://bitbucket.org/hski/issuestats-public/wiki/Home

With the following command

git submodule add [email protected]:hski/issuestats-public.git issuestats

I'm getting the following error message

fatal: Not a git repository (or any of the parent directories): .git

Upvotes: 1

Views: 4419

Answers (1)

AD7six
AD7six

Reputation: 66298

The error message is referring to your working copy - not the remote.

cd /no/git/here
git submodule add foo bar
fatal: Not a git repository (or any of the parent directories): .git

You need to add submodules to a git repo

cd /my/repos/project-x
git submodule add foo bar
# will work or give a more specific error

If you just want to get the code so you can use it, you need to clone the repo:

git clone https://bitbucket.org/hski/issuestats-public.git issuestats

Upvotes: 4

Related Questions