Skip to content

A simple Go application to automate updating multiple local git repositories by pulling the latest changes.

Notifications You must be signed in to change notification settings

gor0utine/git-updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-updater

A simple Go application to automate updating multiple local git repositories by pulling the latest changes.

Features

  • Reads a list of repository paths from a configuration file.
  • Iterates through each repository and performs a git pull.
  • Logs the update status for each repository.

Usage

  1. Clone this repository:

    git clone https://github.com/gor0utine/git-updater.git
    cd git-updater
  2. Configure repositories:

    • Create a file named config.json in the project directory.
    • Add the absolute paths to your local git repositories, one per line.

    Example config.json:

    {
       "interval_minutes": 10,
       "repositories": [
         "/Users/Username/Projects/my-awesome-project"
       ],
       "folders": [
         "/Users/Username/Projects/golang-projects"
       ]
    }
    
  3. Build and run:

    go build -o git-updater main.go
    ./git-updater config.json

Requirements

  • Go 1.18 or newer
  • Git installed and available in your system's PATH

How it works

The application reads the config.json file, changes directory to each listed repository, and runs git pull. Output and errors are logged to the console.

License

MIT License

About

A simple Go application to automate updating multiple local git repositories by pulling the latest changes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages