I have a git repo which have following folders:
_includes/ _layouts/ _plugins/ _posts/ _site/
_site folder is added in the .gitignore
file.
Now can I have a git repo inside _site folder with different remote repo for push and pull? Will there be any conflict?
I have studied git submodules but I think it would be a overkill in my case, if the above stated method can work.
Git allows you to include other Git repositories called submodules into a repository. This allows you to track changes in several repositories via a central one. Submodules are Git repositories nested inside a parent Git repository at a specific path in the parent repository's working directory.
Submodules allow you to keep a Git repository as a subdirectory of another Git repository. This lets you clone another repository into your project and keep your commits separate.
I think it should work. For main repo, _site
folder does not exists. So what you have inside it doesn't matter. When you cd
into _site
you will be on that independent repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With