is there any way to fetch only history? Sometimes repositories are big and it takes very long period of time to download it.
I don't need a files, i just need to look for commits history with git log and git show.
is there any way to fetch only history? Sometimes repositories are big and it takes very long period of time to download it.
I don't need a files, i just need to look for commits history with git log and git show.
No if you want to see all the history locally, you will need to clone all changes.
You just can do so in a bare repo (git clone --bare
) in order to not checkout the default branch HEAD.
But that won't mean downloading less data: only a shallow clone would download less, but that would mean a partial history.
No you can't.
In Git repositories, commits and files are managed separately. So it should be possible to implement a feature to fetch only commits, but such a feature is not implemented yet.
Note that a commit in a repository includes only information git show -q <commit>
shows.
So, if such a feature would be implemented, you can't see diffs or so in a repository fetched by the feature.