• Stars
    star
    466
  • Rank 94,105 (Top 2 %)
  • Language
    Shell
  • License
    MIT License
  • Created almost 8 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Show uncommitted, untracked and unpushed changes for multiple Git repos

mgitstatus

Show uncommitted, untracked and unpushed changes in multiple Git repositories. Scan for .git dirs up to DEPTH directories deep. The default is 2. If DEPTH is 0, the scan is infinitely deep.

mgitstatus shows:

  • Uncommitted changes if there are unstaged or uncommitted changes on the checked out branch.
  • Untracked files if there are untracked files which are not ignored.
  • Needs push (BRANCH) if the branch is tracking a (remote) branch which is behind.
  • Needs upstream (BRANCH) if a branch does not have a local or remote upstream branch configured. Changes in the branch may otherwise never be pushed or merged.
  • Needs pull (BRANCH) if the branch is tracking a (remote) branch which is ahead. This requires that the local git repo already knows about the remote changes (i.e. you've done a fetch), or that you specify the -f option. mgitstatus does NOT contact the remote by default.
  • X stashes if there are stashes.

Since there are a lot of different states a git repository can be in, mgitstatus makes no guarantees that all states are taken into account.

mgitstatus can also list dirs that are not a repo, if given the -w switch. To ignore certain repos, set the mgitstatus.ignore git config flag for that repo to true. (See "usage" below for an example).

Usage

Usage: mgitstatus [--version] [-w] [-e] [-f] [--throttle SEC] [-c] [-d/--depth=2] [--flatten] [--no-X] [DIR [DIR]...]

mgitstatus shows uncommitted, untracked and unpushed changes in multiple Git
repositories. By default, mgitstatus scans two directories deep. This can be
changed with the -d (--depth) option.  If DEPTH is 0, the scan is infinitely
deep.

  --version        Show version
  -w               Warn about dirs that are not Git repositories
  -e               Exclude repos that are 'ok'
  -f               Do a 'git fetch' on each repo (slow for many repos)
  --throttle SEC   Wait SEC seconds between each 'git fetch' (-f option)
  -c               Force color output (preserve colors when using pipes)
  -d, --depth=2    Scan this many directories deep
  --flatten        Show only one status per line

You can limit output with the following options:

  --no-push
  --no-pull
  --no-upstream
  --no-uncommitted
  --no-untracked
  --no-stashes
  --no-ok          (same as -e)

The following example scans all directories under the current dir, with a depth of 2. That means the current dir and all directories directly under it.

~/Projects/fboender $ mgitstatus
./mgitstatus: ok
./mdpreview: ok
./snippets: ok
./boxes: ok
./ansible-cmdb: Uncommitted changes Untracked files
./scriptform: Uncommitted changes

For more examples, see the manual page.

Installation

mgitstatus requires make.

The following steps will install mgitstatus:

# Clone the repo
$ git clone https://github.com/fboender/multi-git-status.git
$ cd multi-git-status

# Install globally (all users)
$ sudo make install

# Install locally (only your user)
$ PREFIX=~/.local make install

License

Copyright 2016-2022, Ferry Boender (et al).

Licensed under the MIT license. For more information, see the LICENSE.txt file.

More Repositories

1

ansible-cmdb

Generate host overview from ansible fact gathering output
Python
2,334
star
2

harview

A commandline tool which takes as input a .har (HTTP Archive) file and dumps a human-readable summary of it to the console
Python
51
star
3

sshbg

Change terminal background when SSH'ing (on specific terminals)
Python
49
star
4

scriptform

Webserver that automatically generates forms to serve as frontends to scripts
Python
46
star
5

pyupnpclient

Highlevel UPnP client in Python
Python
38
star
6

bexec

A vim plugin that allows the user to execute the current buffer
Vim Script
23
star
7

awesome-devop-tools

A curated list of development and operational tools.
21
star
8

mdpreview

A simple QT-based Markdown previewer, designed to be used with an external editor.
Python
21
star
9

jerrybuild

Lightweight simple build server
Python
16
star
10

cfgtrack

cfgtrack tracks and reports diffs in files between invocations.
Shell
15
star
11

sec-tools

Unixy security tools for reporting and alerting about security information and events
Python
14
star
12

my_indexr

A tool that outputs SQL commands for dropping and recreating indexes on MySQL databases / tables.
Python
12
star
13

sla

The Simple Little Automator
Shell
12
star
14

thinkndo

A hierarchical outliner and todo manager
Python
8
star
15

hircd

A minimal, hacky implementation of an IRC server daemon written in Python in about 400 lines of code
Python
8
star
16

pybrainfuck

A speed-optimized Brainfuck interpreter written in Python
Python
6
star
17

davis

Python Data Visualizer
Python
6
star
18

whatswrong

Scan your system for misconfigurations, security problems and other issues.
Python
6
star
19

jsonxs

A python library that uses path expression strings to get and set values in JSON
Python
6
star
20

rssmerger

Chronologically merge multiple RSS feeds into a single feed
Python
6
star
21

pydocmd

Generate Python module / script documentation in the Markdown (md) format.
Python
5
star
22

templum

Extremely lightweight, simple yet powerful and fast templating engine for PHP
PHP
5
star
23

gcountdown

A very simple alarm countdown timer that sits in your sys tray.
Python
4
star
24

mod_sec_report

Generate a HTML report from mod_security JSON logging
Smarty
3
star
25

alarm.sh

A small shell script that can aid you in alerting you of things at specified times
Shell
3
star
26

documents

The source for the documents I wrote
HTML
3
star
27

omnitool

Python
3
star
28

mcram

Simple shell script for managing a Minecraft Server on a RAM disk
Shell
3
star
29

timeit

Record periodic command execution time, duration, exitcode and output
Python
2
star
30

myqryreplayer

Read the MySQL query log and replay against a database
Python
2
star
31

rss2mysql

Small script which reads in an RSS feed, takes the news items and then puts them in a MySQL database.
PHP
2
star
32

micromedialauncher

A super-lightweight media browser and launcher.
Python
2
star
33

statlog

Log statistics about CPU, I/O and Memory usage in a plain text file for later analysis.
Python
1
star
34

dataq

A simple data and message queuing server which uses a simple plain-text protocol
Python
1
star
35

lurch

A unixy launcher and auto-typer
Python
1
star
36

qtboot

Scaffolding for QT window.
Python
1
star
37

listpatron

A GTK2 application which keeps lists of things.
C
1
star
38

mcplayeredit

A Minecraft player- and inventory editor (deprecated)
Python
1
star
39

multitray

Python
1
star
40

list-python-pkgs

A high-level overview of which Python package you need to get the job done.
1
star
41

miniorganizer

A small no-nonsense personal digital organizer written in GTK2, featuring appointments, todos and notes
Python
1
star
42

nimf

A two (or more) panel filemanager ala Norton Commander for X written in GTK
C
1
star
43

pieterpost

A pop3/mail web interface written in PHP.
PHP
1
star