Cloning GitHub subfolder only

raul's Avatar


19 Jul, 2019 10:27 PM


is it possible with AppVeyor to clone only a subfolder from the repo? We do not need the entire repo for our Windows build, and it would be a massive time improvement.

Perhaps similarly to how submodules are updated during install step. I have not seen how to prevent the entire repo from cloning though.


  1. 1 Posted by raul on 23 Jul, 2019 07:05 PM

    raul's Avatar

    I'll answer my own question.

    clone_script in .appveyor.yml overrides the default clone command, so you can do custom cloning there. See for an example.

    However, git does not provide an easy way to pull a subfolder, and there's some trickery required. We decided to delay the implementation to keep our build system simple and more maintainable, and would probably use subtrees or submodules as an alternative.

  2. 2 Posted by Owen McDonnell on 23 Jul, 2019 09:57 PM

    Owen McDonnell's Avatar

    Sorry to have missed your original ticket.
    Looks like you found the clone_script override option.
    I agree that submodules would be the simplest way to go if you want to break a large repo into smaller more manageable projects.

  3. Ilya Finkelshteyn closed this discussion on 23 Sep, 2019 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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

Recent Discussions

07 Jul, 2020 06:21 PM
07 Jul, 2020 03:15 PM
05 Jul, 2020 02:33 AM
03 Jul, 2020 07:29 PM
03 Jul, 2020 03:53 AM


02 Jul, 2020 09:09 PM
02 Jul, 2020 03:24 PM
01 Jul, 2020 01:12 PM
30 Jun, 2020 04:26 PM
25 Jun, 2020 05:54 PM
24 Jun, 2020 08:11 AM