1

I have a git repo that contains a grunt task that uses Bower to check out and arrange code from other git repos. For testing purposes, I would like to have several sources in a fixtures directory. Something like:

/test
    /fixtures
        /foo-project
            .git/
            foo.js
            bower.json
        /bar-project
            .git/
            bar.js
            bower.json

In order to version the fixtures alongside the tests, I would like to check in the .git directories under fixtures. (I know this is an odd thing to do, but I can't find a better way.) However, I don't know how to make git check in .git files. Is it possible?

Another thought I had was checking in the files in a directory named git and renaming it to .git at runtime, but that's sorta hacky.

I read about submodules, but it looks like those have to be external git repos, and I'd really rather version the fixtures along with the tests.

Nick Heiner
  • 119,074
  • 188
  • 476
  • 699

1 Answers1

0

Not sure if my answer applies to you, I had the same problem, but while using buildout for building and deploying my django project.

I found out that this buildout extension was very helpfull for avoiding the hell of git submodules:

https://pypi.python.org/pypi/gp.vcsdevelop/2.2.3

If you want to see my implementaion, see this answer: Do you version control the invidual apps or the whole project or both?

If you want to know more about git submodules (ignoring my warning :-) ), somebody gave a very clear explanation in this answer: Tracking 3rd party code with Git

Community
  • 1
  • 1
michel.iamit
  • 5,788
  • 9
  • 55
  • 74