https://github.com/joemendonca/git-auto-pull
This tool installs a daily cron job that automatically pulls the latest changes from a Git repository.
https://github.com/joemendonca/git-auto-pull
Last synced: 27 days ago
JSON representation
This tool installs a daily cron job that automatically pulls the latest changes from a Git repository.
- Host: GitHub
- URL: https://github.com/joemendonca/git-auto-pull
- Owner: joemendonca
- Created: 2025-08-27T20:21:32.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-27T20:46:03.000Z (10 months ago)
- Last Synced: 2025-08-28T05:15:51.990Z (10 months ago)
- Language: Shell
- Homepage: https://electricmonument.com
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Auto Git-Pull Installer
This tool installs a daily cron job that automatically pulls the latest changes
from a Git repository.
I needed a hands-off method of maintaining local versions of a repository on multiple machines. Here it is. This will make a daily pull of your repository. Drop this into the repository's root folder, run the installer, and you should be in business.
## Installation
### 1. Download or Clone
Clone this repo or copy the installer script (`install.sh`) into the root of any Git repository you want to keep updated.
```bash
git clone https://github.com/your-username/auto-git-pull.git
cd auto-git-pull
```
### 2. Make Executable
Ensure the installer script has execute permissions:
```bash
chmod +x install.sh
```
### 3. Run Installer
Run the installer to configure the auto-pull:
```bash
./install.sh
```
During setup you will be prompted for:
- Repository path → e.g. /Users/joe/Projects/electric-monument-server
- Time of day → in 24-hour format, e.g. 07:30 for 7:30 AM
The installer will:
- Create a helper script git-auto-pull.sh in your repo
- Add a cron job that runs this script daily at the time you specified
- Log all output to git-auto-pull.log
### Uninstallation
To remove the cron job and disable auto-pull for this repo, run:
./install.sh --remove
This only removes the cron entry. Your repository and log file remain intact.