Breakpoint cloning of very large git repositories by fetching tags one by one.
# Go to the source code directory
go build -o git-clone-tags
git-clone-tags -remote repoAddress -show-tags [-tags matchString] [-end-build] [-min-major n] [-min-build n]
git-clone-tags -remote repoAddress -repo path [-tags matchString] [-end-build] [-min-major n] [-min-build n]
-end-build
calculating the maximum build version (default true)
-min-major int
filter minimum major version number
-min-build int
filter minimum build version number
-remote string
remote url (needed)
-repo string
repository path
-show-tags
display matching tags, but do not clone to local repo
-tags string
tags matching string
- display the final version of each master release and >= min-build
./git-clone-tags -remote https://chromium.googlesource.com/chromium/src -show-tags -min-major 60 -min-build 200 -end-build
64.0.3282.204
65.0.3325.230
66.0.3359.203
86.0.4240.281
88.0.4324.218
90.0.4430.246
96.0.4664.219
100.0.4896.241
102.0.5005.200
106.0.5249.225
108.0.5359.228
110.0.5481.213
- Filter versions using matching expressions
./git-clone-tags -remote https://chromium.googlesource.com/chromium/src -show-tags -tags "100.0.*.*"
- clone the filtered version
./git-clone-tags -remote https://chromium.googlesource.com/chromium/src -tags "4.*.*.*" -min-build 200 -repo chromium/src