3

Im starting to work with git submodules and Im a bit confused. Basically on my project I needed a modified version of hybridauth library. So I forked hybridauth, did my changes and added it as a submodule of my repo.

Now when I try to do a release of my repo or simple download a zip copy of my master branch (I use bitbucket and sourcetree ) I get the project with an empty hybridauth folder on it.

I think I have everything configured properly. When I do changes on the submodule then I also commit then in the main repo.

But I can't download the whole project in one file to redistribute it.

How can I do it? Thanks!

chifliiiii
  • 2,231
  • 3
  • 28
  • 37
  • I had the same issue and VonC's response worked for me as well. Just need to use `git submodule update --init --recursive` if your repo's submodules also have nested submodules. – MichaelS May 18 '17 at 19:47

2 Answers2

1

You could build that one archive file by:

However, that arcive is local only (not visible on BitBucket). GitHub offers a way to associate an artifact (like an archive file) to a "release".

For BitBucket, you could associate your project with a Continuous Integration (CI) service, and repeat the steps above as part of a build/packaging job, and distribute the resulting deliverable (the zipped archive) through that CI service.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Not sure exactly how Github handles releases with submodules, but for people cloning your repo, they should use git clone --recursive git://github.com/foo/bar.git to get your submodule.

Serban Constantin
  • 3,316
  • 1
  • 18
  • 20
  • Yep I read about that, but is not what Im really asking. In more interested on a zip file to deliver to normal users that know nothing about git – chifliiiii Feb 05 '15 at 20:32