In go project, there is a builtin command name "go get"
which will trigger "git clone" or "git pull".

createCmd: []string{"clone {repo} {dir}", "--git-dir={dir}/.git submodule 
update --init --recursive"},
downloadCmd: []string{"pull --ff-only", "submodule update --init 

It's unwise to clone the whole repository just for Go projects compile with 
source code on master.
Therefor I raise a proposal for --depth args 
cmd/go: use shallow clones for new git checkouts 
but, Russ (go project maintainer) says @

Does this *reshorten* the history after the pull? I can see this might 
> really frustrate people who checked out into $GOPATH themselves with full 
> history and then just ran 'go get -u' to update it and got a truncated 
> history. Maybe the --depth=1 should only be on clone?

Another possible problem with this CL is that 'go get' expects to be able 
> to look at the tags in the repo and possibly select a different version of 
> the code. It's not clear to me that 'go get' has all the information it 
> needs if only a shallow clone is done. 

I'm wondering about is there a proper way for golang project to min 
download size ?

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to