Skip to main content

Sync a ref against its upstream VCS branch

POST 

/api/v1/projects/:project_id/sync

Fetch-on-demand sync. VCS-source projects only.

Resolves the ref's tracked branch to its upstream HEAD sha; when it matches the ref head's recorded commit the sync is a no-op (unchanged, no download). Otherwise the archive is downloaded, normalized, content-addressed and appended, and the ref advances (synced). Provider calls retry transient failures with bounded backoff and fail fast on permanent ones.

  • Scope required: projects:manage_source + manager-or-above.
  • Archived projects reject the sync (409).

Request

Responses

Successful Response