Home > Back-end >  Buddy SFTP deployment - deploy from specific commit
Buddy SFTP deployment - deploy from specific commit

Time:10-07

After signing up at https://Buddy.works I have setup a pipeline for SFTP deployment - but it wants on initial deploy to upload ALL files.

Subsequent deployments would only be the new files.

AS this is a large project I dont want to reupload all files... how can one start uploading files from a specific git commit?

CodePudding user response:

Buddy.works support answered my question - they already support this feature:

In the pipeline settings, you can set "current revision". With this set, whenever you run an execution it will only upload the difference between the "current revision" and the revision selected for deployment.

CodePudding user response:

A specific Git commit would reference all files of a repository, since this is what a commit is (a pointer to a snapshot of the full repository).

A commit diff (with, for instance, the parent commit) might reference fewer files, so you might clone a repo without checking it out, and then checkout/restore only the files you want, as in here

 cd /path/to/local/cloned/repo
 git diff --diff-filter=AM --name-only <aSHA> <aSHA>~1 | xargs git restore

From that partially checked out repository, you could initiate your sftp.

  • Related