I\'m developing an application that uses git, so I need to test its integration with git. Inside my git repository, I need to have another repository (my_git_repo/tests/anot
You could transform your nested repository into a bare repo. A bare repository can be committed inside another repository.
One way (more here) to transform a repository into a bare repository:
git clone --bare test-repo
cd test-repo.git # directory created by previous command
git remote rm origin # to remove the pointer to your original repo
Now, test-repo.git
can be committed inside your main repository. If, at some point, you'd like to make edits in your test repository (edit files, add commits) you can just clone it back into a non-bare repo (git clone test-repo.git
).