I am working on a git-related software and I have included unit tests in my code.
I have created a test git project (under a subdirectory) to be used by the tests: resources/test-git-project
This test git project is not associated to any remote, but it contains commits/tags/branches.
What is the safest way to commit the contents of resources/test-git-project in git?
Thanks to Thibault D. answer I found the solution I was looking for:
I have renamed
.gittogitdirand it is now commitable:When I want to perform updates or see the status of the test repo I do the following:
Before performing the unit tests I copy the directory
resources/test-git-projectunder/tmpand rename/tmp/test-git-project/gitdirto/tmp/test-git-project/.git, so that I don't have to mess with--git-diroption on my test code.