I'm tasked with making our build go faster and one of the movements I'm trying to make is from CVS to Git (wish me luck guys). Currently one of the most cumbersome tasks in our build is the actual checkout of the project which can take around 15 minutes at the worst of times. I will be setting up a CI to build whatever is in a branch and was wondering how I could make the build happen each time without needing to completely checkout the entire project from a clean workspace every time.
The project contains a lot of submodules and from my understanding, submodules can get a bit tricky to deal with when you need to update them or remove them. My experience with submodules is that unless you get the order of operations right, you can get left with rogue files here or there when doing resets and cleans.
Is there some sequence of commands where given a current clean working-tree, I can checkout another commit and call the git clean,reset,submodule-sync,update whatever to result in another clean working-tree? Like i said before I'm trying to work out the path of least downloading/checkouting to get to my new working tree.
Thanks for your help and If all you have is some good references for me to look up all the edge cases myself I would highly appreciate it!