When use Git in a deployment it is often need to get know commit history and relationship. There is no problems when the repo is small. But for big repositories to get full history it is required to fetch all the objects. This operation consumes much bandwidth and takes much time.
So, the problem:
need operate with history of a big Git repo without fetching content.
It would be nice to fetch few MBs and get working git log
, git rev-parse
, git rev-list
, etc. without ability to checkout contents.
idea1. dedicated branch _metainfo with raw output from git log
Store output of git log
to dedicated branch.
But this approach will require own parser.
This is suitable for very simple tasks.
idea2. prune file contents
git filter-branch tree-filter "echo >**"
(pseudo-code). This will change hash of commits, but store commit messages and dates. And old commit hash can be added to filtered commit message.
upd.
Thank you for the answers. I have already read possible duplicates and get know: "no solution at the moment". During this research I implemented my 1st idea as a simple workaround and 2nd as a concept of working solution. Both of them gives semi-usable results. I'd prettify and publish them if community interested.