https://github.com/thiswillbeyourgithub/git_scripts_keeper
A bash utility to automatically commit changes across multiple Git repositories, ideal for script and configuration management.
https://github.com/thiswillbeyourgithub/git_scripts_keeper
Last synced: 10 months ago
JSON representation
A bash utility to automatically commit changes across multiple Git repositories, ideal for script and configuration management.
- Host: GitHub
- URL: https://github.com/thiswillbeyourgithub/git_scripts_keeper
- Owner: thiswillbeyourgithub
- License: gpl-3.0
- Created: 2025-03-11T12:25:07.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-03-27T14:08:33.000Z (11 months ago)
- Last Synced: 2025-03-27T15:24:55.298Z (11 months ago)
- Language: Shell
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git Scripts Keeper
A simple bash utility that automatically commits changes in multiple git repositories.
## Description
Git Script Keeper is a bash script that helps you manage multiple git repositories by automatically detecting changes and committing them. It reads a list of repository paths from a file and processes each repository, committing any changes with an auto-generated commit message.
Inspired by etckeeper, Git Script Keeper was created to track changes in scripts and configuration folders that aren't covered by system configuration management tools.
## Features
- Automatically detects changes in multiple git repositories
- Skips repositories with no changes
- Generates commit messages that include the list of modified files
- Handles errors gracefully (non-existent directories, non-git repositories)
- Supports comments and empty lines in the repository list file
- Made to be run periodically via systemd or cron.
## Usage
```bash
./git_scripts_keeper.sh
```
### Example repository list file (repos.txt):
```
# My repositories
/home/user/projects/project1
/home/user/projects/project2
# This one is commented out
# /home/user/projects/inactive-project
/home/user/projects/project3
```
### Options
- `-h, --help`: Display help message and exit
## Requirements
- Bash shell
- Git
## Installation
1. Download this script via `git clone`
2. Make it executable: `chmod +x git_scripts_keeper.sh`
3. Create a repository list file with one repository path per line into `repos.txt`.
4. Launch via `./git_scripts_keeper.sh repos.txt`
5. Optional: make it periodic via the systemd unit in the folder `systemd_units` or via cron.