My context is the following:
So I would like to have a local Git repository that contains the least amount of data, to allow operations like:
Is something like that possible at all? I know already what a bare repository is (it gives you all commits including the file data), and I have read about git shallow clone, but both give me with the commits all data.
No, what you are asking (to have commits without the actual content) is fundamentally not supported by git. Depending how your remote is hosted, the hosting server might provide API's that you could use to manipulate refs (branches and tags) without having to clone, but that's about it.
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