submodule-syncer
v1.2.0
Published
Submodule Syncer is a Node.js application designed to monitor and synchronize changes across multiple Git repositories. It ensures that all repositories are on the same branch as the main project repository and automatically commits and pushes changes whe
Readme
Submodule Syncer
Submodule Syncer is a Node.js application designed to monitor and synchronize changes across multiple Git repositories. It ensures that all repositories are on the same branch as the main project repository and automatically commits and pushes changes when files are modified or deleted.
The Submodule Syncer is build to crash early if the git status is not clean in the repositories. This is to prevent any unwanted changes to the repositories.
Features
- Monitors specified folders for file changes.
- Automatically commits and pushes changes to the respective repositories.
- Ensures all repositories are on the same branch as the main project repository.
- The main project is optional and can be omitted. In this case, the application will only monitor the specified folders for changes.
Prerequisites
- Node.js (>= 18.12.1)
- Git
Installation
Clone the repository:
git clone [email protected]:plansoft/plan-software/3pq/document-generation/submodule-syncer.git cd submodule-syncerInstall the dependencies:
npm installCopy the
.env.examplefile to.envand configure the paths:cp .env.example .env
Configuration
Edit the .env file to specify the folders to watch and the main project path:
FOLDERS_TO_WATCH='["/path/to/folder1", "/path/to/folder2"]'
MAIN_PROJECT='/path/to/main/project'For Windows paths, use single slashes and add the drive letter, e.g., D:/path/to/folder1.
Usage
Start the application:
npm startThe application will start monitoring the specified folders for changes and synchronize the repositories accordingly.
Changelog
All notable changes to this project are documented in the CHANGELOG.md file.
Contributing
If you need a feature or found a bug, please open an issue and inform me via Slack. If you want to contribute, please create a feature branch and a merge request.
Author
Stefan Dausend-Werner
