#git #projects #system #fetch #repo #show

yanked git-projects

A program to see the state of git projects on a system

1 unstable release

0.1.0 Sep 18, 2024

#150 in #repo

MIT/Apache

12KB
213 lines

git-projects

See the state of git projects on a system.

It shows you whether your current repo has any diffs, and whether local branches are ahead of/behind their remote counterparts. By default it doesn't do a fetch first, but you can ask it to by specifying --fetch.

N.B. This is a very young project, but the basic functionality is enough to be useful.

Installation

$ cargo install git-projects

Usage

  1. Create a file, ~/.git-projects.toml, with the projects you want to monitor. Tilde and environment expansions are allowed, according to [shellexpand::full()]:
repos = [
    "/usr/local/whatever",
    "~/src/another/",
]

If git-projects sees a .git-projects.toml file in the current directory, that will override the one found in ~/.

  1. Run git-projects to see the current state of those projects:
/usr/local/whatever:
    main: Behind 95
    my-local-branch: Behind 3
~/src/another/:
    2 diffs
    main: Behind 1
  1. Run git-projects --fetch to do a git --fetch on those projects before showing their state.

Dependencies

~19–29MB
~496K SLoC