#git-repository #git #git-tool #yaml #declarative

bin+lib git-repo-manager

Manage multiple git repositories. You configure the git repositories in a file, the program does the rest!

32 releases

0.7.22 Nov 30, 2024
0.7.18 Aug 25, 2024
0.7.16 Apr 27, 2024
0.7.15 Nov 6, 2023
0.4.0 Nov 29, 2021

#343 in Development tools

Download history 11/week @ 2024-08-18 159/week @ 2024-08-25 7/week @ 2024-09-01 28/week @ 2024-09-15 19/week @ 2024-09-22 8/week @ 2024-09-29 1/week @ 2024-10-06 1/week @ 2024-10-13 353/week @ 2024-11-03 25/week @ 2024-11-10 10/week @ 2024-11-17 84/week @ 2024-11-24 62/week @ 2024-12-01

196 downloads per month

GPL-3.0-only

395KB
9K SLoC

Rust 4.5K SLoC // 0.0% comments Python 3.5K SLoC // 0.2% comments Jinja2 568 SLoC Shell 133 SLoC // 0.0% comments Just 69 SLoC Pacman's makepkg 39 SLoC // 0.0% comments

GRM — Git Repository Manager Nix Flake Check

GRM helps you manage git repositories in a declarative way. Configure your repositories in a TOML or YAML file, GRM does the rest.

Also, GRM can be used to work with git worktrees in an opinionated, straightforward fashion.

Take a look at the official documentation for installation & quickstart.

Why?

I have a lot of repositories on my machines. My own stuff, forks, quick clones of other's repositories, projects that never went anywhere ... In short, I lost overview.

To sync these repositories between machines, I've been using Nextcloud. The thing is, Nextcloud is not too happy about too many small files that change all the time, like the files inside .git. Git also assumes that those files are updated as atomically as possible. Nextcloud cannot guarantee that, so when I do a git status during a sync, something blows up. And resolving these conflicts is just no fun ...

In the end, I think that git repos just don't belong into something like Nextcloud. Git is already managing the content & versions, so there is no point in having another tool do the same. But of course, setting up all those repositories from scratch on a new machine is too much hassle. What if there was a way to clone all those repos in a single command?

Also, I once transferred the domain of my personal git server. I updated a few remotes manually, but I still stumble upon old, stale remotes in projects that I haven't touched in a while. What if there was a way to update all those remotes in once place?

This is how GRM came to be. I'm a fan of infrastructure-as-code, and GRM is a bit like Terraform for your local git repositories. Write a config, run the tool, and your repos are ready. The only thing that is tracked by git is the list of repositories itself.

Crates

Links

Mirrors

This repository can be found on multiple forges:

Dependencies

~17–28MB
~468K SLoC