Git
Why does appveyor do a full git clone to a depth of 50 from github. I have a repo with a big history and it seems to take about 2min. Would it be faster to just clone the top of the branch being built
git clone -b mybranch --depth 1 --single-branch git://sub.domain.com/repo.git
for example. Might speed things up.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 24 Apr, 2014 05:29 PM
Unlike Mercurial, Git doesn't allow cloning/fetching particular commit. I'm afraid slicing the last commit with depth=1 won't guarantee that this is exactly the commit you were looking for, especially within large teams committing often (there may be newer commit between that commit and the moment build starts).
What could be really interesting is downloading GitHub repo using API: https://developer.github.com/v3/repos/contents/#get-archive-link We haven't tried that yet, but I guess it might be much faster (provided you don't need a real Git repo in your build folder).
2 Posted by bradphelan on 25 Apr, 2014 05:13 AM
Here's a trick. Github has an SVN interface so you can do
http://stackoverflow.com/questions/9609835/git-export-from-github-r...
and get only the latest files.
3 Posted by bradphelan on 25 Apr, 2014 05:14 AM
but the tarball export is probably the fastest
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:38 AM.