#git-repository #local-git #git #command-line-tool #batch-processing

app reposcan

Command line tool for discovering local git repositories and keeping track of local and remote changes collectively

5 unstable releases

0.3.0 Feb 9, 2025
0.2.2 Feb 5, 2025
0.2.1 Feb 5, 2025
0.2.0 Feb 3, 2025
0.1.0 Feb 2, 2025

#418 in Command line utilities

Download history 148/week @ 2025-01-28 368/week @ 2025-02-04 80/week @ 2025-02-11

596 downloads per month

Apache-2.0

18KB
311 lines

reposcan – a manager for git repositories

Command line tool for discovering local git repositories and keeping track of local and remote changes collectively.

Motivation

Perhaps you find yourself using many git repositories to collaborate and keep track of versions in software development, scientific projects, or even your creative works. Then a tool such as this might be helpful by

  • discovering repositories on your device by scanning directory trees,
  • curating a list of repositories for fast interactions,
  • checking the collective status at a glance, i.e. seeing which repositories contain uncommitted changes,
  • fetching commits to all repositories from all remotes with a single command,
  • listing all known repositories.

Installation

There are currently no precompiled binaries available. reposcan can be compiled from source via rust's cargo package manager from crates.io. Instructions there can be found under the "Install". If rust is not yet installed, visit rustup.rs for instructions.

Usage

A quick and crisp entry into using reposcan can be found by typing

reposcan --help

Discovery and curation

As a first step,

reposcan discover

will search the current directory and subdirectory for git repositories with a file tree. You will see

  1. a list of newly discovered repositories as well as
  2. a list of repositories which were curated but not found anymore.

In a second step, you may either add the newly found repositories by typing

reposcan discover --add

or remove obsolete repositories by typing

reposcan discover --prune

Discovery and curation only consider the current working directory and its subdirectories, because these are potentially the most time-consuming operations. In contrast, checking the status and fetching are performed on all known repositories in the curated list independent of the current working directory.

Status

Typing

reposcan status

lists changes to repositories that have changed files or are in an in-between state of merging, rebasing, etc.

Clean repositories will not show up.

Fetching

By executing

reposcan fetch

all known repositories are entered and updated from all remotes.

Currently if an unauthenticated fetch fails (most likely due to required authentication), the fetching is repeated via a git subprocess. If one has set up git to properly authenticate to a server, then authentication will also work with reposcan without the need to set it up seperately. This solution is privacy-preserving insomuch that a user does not have to trust reposcan to handle their credentials.

Listing

reposcan list

will output all known repositories.


This project is not affiliated with the Git™ project nor with the Software Freedom Conservancy.

Dependencies

~10–18MB
~297K SLoC