0

When we do a build to Production or UAT, we never push all the files in the repo to the environment. We only push the files that have changed. Those files could be a set of 15 out of 3,000, for example and exist anywhere in the directory structure.

SERVANT14
  • 75
  • 6

1 Answers1

0

If your execution environment has git, you could consider:

  • pushing to a bare repo on that execution server
  • having a post-receive hook which would checkout a working tree where your files reside.

Both the push and the checkout would only consider a delta and not all the files.

See for instance:

The other solution, without git on the server, is some kind of rsync.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I'll look into rsync. Help me understand the other suggestion. I'm not very familiar with bare repos and hooks yet, So I'd have a copy of the repo (bare) in that environment. Then, whenever a commit happens at the central repo, that would result in those changes being pushed down to the bare repo because of the hook? Is that right? We're planning on only commiting to the Prod and UAT branches when a deployment also needs to happen (Prod = master) – SERVANT14 May 28 '14 at 11:55
  • @MASTERT I have added links which illustrates the process. http://stackoverflow.com/a/23510268/6309 and http://stackoverflow.com/a/23510268/6309 both take into account the branch on which you are pushing. – VonC May 28 '14 at 12:08