Giter Club home page Giter Club logo

multi-git-status's Introduction

Multi-git-status

Show uncommited, untracked and unpushed changes in multiple Git repositories.

multi-git-status shows:

  • Uncomitted 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. Multi-git-status 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, multi-git-status makes no guarantees that all states are taken into account.

multi-git-status can also list dirs that are not a repo, if given the -w switch.

Usage

Usage: mgitstatus [-w] [-e] [-f] <DIR> [DEPTH=2]

Scan for .git dirs under DIR (up to DEPTH dirs deep) and show git status

  -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)

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 
./multi-git-status: ok 
./mdpreview: ok 
./snippets: ok 
./boxes: ok 
./ansible-cmdb: Uncommitted changes Untracked files 
./scriptform: Uncommitted changes 

To scan deeper:

~/Projects $ mgitstatus . 3
./megacorp/ansible: ok 
./megacorp/monitoring: ok 
./fboender/multi-git-status: ok 
./fboender/mdpreview: ok 
./fboender/snippets: ok 
./fboender/boxes: ok 
./fboender/ansible-cmdb: Uncommitted changes Untracked files 
./fboender/scriptform: Uncommitted changes 
./fboender/startpage: ok 

Installation

Multi-git-status requires a POSIX compliant shell. Bash will do fine.

  1. Clone this git repo
  2. Copy mgitstatus somewhere in your PATH

Or follow these instructions:

$ curl -s -o mgitstatus https://raw.githubusercontent.com/fboender/multi-git-status/master/mgitstatus
$ chmod 755 mgitstatus
$ sudo mv mgitstatus /usr/local/bin/

License

multi-git-status is released under the MIT license.

multi-git-status's People

Contributors

fboender avatar

Watchers

Kim Taylor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.