In Git, there is a command git clone --depth=<depth>
to retrieve historical data only specific length. there are also a command to gather more historical data by use git fetch --depth=<depth>
.
How about when we want to free some spaces from large repository? I know that we may use git gc
or git prune
but are there other way to specific like --depth=<depth>
to reduce number of commit store in local repository? AND it also should keep SHA1 to be able continue to working with it.