# Git-sync

Git-sync is a lightweight tool that automatically mirrors a Git repository into a local directory and keeps it up to date. It is open source and self-hosted, installable on Docker Hub.

Canonical page: https://ourlocalhost.com/app/5087/git-sync

## Description

Git-sync is a lightweight tool that automatically mirrors a Git repository into a local directory and keeps it up to date. It watches the remote for changes and re-pulls on a regular interval (or just once), tracking the HEAD of a branch, a tag, or a specific commit. Its minimal footprint makes it a popular sidecar container in Kubernetes, letting applications consume files pulled straight from a repository.

## Platform availability

Available on 0 of 10 platforms.

## Health score

72/100 (Good), based on 4 of 5 factors.
- Maintained: 98 (last commit 19 days ago)
- Popular: 69 (2,748 GitHub stars)
- Easy to install: 25 (0 install platforms, install notes, Docker image)
- Security check: 71 (no serious findings, 6 minor, CI, tests, OpenSSF Scorecard 7.2/10)

## Links

- GitHub: https://github.com/kubernetes/git-sync
- Docker Hub: https://hub.docker.com/r/ubuntu/git-sync

## Common questions

### How should an application safely consume the synced files while git-sync is updating?

Use the symlink named by --link, not the --root working directory, because git-sync publishes each sync through a worktree and a named symlink. This gives consumers an atomic view of the repository.

### Which repository targets can git-sync keep synchronized?

It can pull from the HEAD of a branch, a git tag, or a specific git hash. It re-pulls only when the referenced target has changed upstream.

### Can git-sync trigger a webhook or command after a successful sync?

Yes, it can be configured to make a webhook call or exec a command after successful synchronization. The call happens after the symlink is updated.

### What remote transports and authentication options does git-sync support?

It can pull over HTTP(S), with authentication or not, or over SSH.

### How can I limit git-sync’s disk and network usage?

It tries to transfer as little data as possible and use as little disk space as possible using --depth and --git-gc. This behavior is not part of the consumer contract.

## Alternatives

- Bazaar: Bazaar is a tool for helping people collaborate.
- Fossil: Fossil is a simple, high-reliability distributed source-control (SCM) system that pairs version control with a built-in web interface, bug…
- Git: Git is a fast, scalable, distributed version control system for tracking changes to files and coordinating work across teams.
- Plastic SCM: Plastic SCM is a commercial SCM system developed by Codice Software.
- lore-webgui: Open source version control system offering scalable data and team workflows, optimized for code and large binaries, with tamper-evident hi…
- subversion: Subversion (SVN) is an open-source, centralized version control system that records every change to files with a full, timestamped revision…

---
Source: Our Local Host (https://ourlocalhost.com/app/5087/git-sync), the self-hosted and open-source app directory.
