0

Build script is given the name of a branch to check out, before building the project.

However, thats about 1GB of data of which the project files represent less than 50Mb of that. I suspect it makes more sense only the subfolder containing the required 50Mb of data (I assume thats possible).

Alternatively, is the any reason not to be specifying a tag? The assumption until now was that it's the history data making the checkout take so long (20 minutes or so). Then I noticed today just how much data is being checked out and suspect that just checking out a tag alone is not going to make much difference.

I think the optimum way to go is a combination; check out only the required subfolder, at a given tag?

For what it's worth btw, it's an iOS/Xcode project, though I doubt that plays a role here.

Rich
  • 532
  • 3
  • 17

3 Answers3

2

There's no difference between checking out a branch or a tag, assuming the HEAD of the branch is what has been tagged.

It's not possible to just checkout a subfolder with git (I'm assuming you mean clone rather than checkout).

jbowes
  • 4,062
  • 22
  • 38
1

As already noted, you cannot clone a subfolder with git. But you can clone the whole repository one time, then clean untracked artifacts between builds. Then pull the latest from whatever repo you're tracking, and you're ready to go.

Community
  • 1
  • 1
Tim Condit
  • 138
  • 4
0

Of course there is a trade off. Checking out the tag will always produce the same results (unless someone has moved the tag, god forbid) and checking out on branch will always get the latest results on that branch.

There is no difference in checking out a tag or a branch time wise, in the end it's just a hash pointing to some commit. The reason it takes so long time is that files have to be replaced on disk and the further you go in history between different checkouts the longer it will take.

rtn
  • 127,556
  • 20
  • 111
  • 121