I am doing unit tests on a python program who, for QA purposes, gets the repository name and the current commit hash from the .git in the directory
For my unit tests on that program I would like to have a dummy .git directory in the tests directory. That .git repository would have a single initialization commit and a remote that would not be used
When attempting to add a .git to my tool's repository, git seems to ignore it and indicates that there are no differences in the status and commit
How can I add the .git directory to my project repository ? Something like tests/.git
I think we would need more details about what you want to achieve to provide like the best answer... but I think you should look at git bundle. You can track a bundle file and then use it to regenerate a git repo.
How can I add a .git directory to a git repository?