Skip to content

varhub/git_status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

git_status

A git status meaningful for big projects.

Provides:

  • status info of every git repository in current directory tree.
  • PS1 functionality (like __git_status) but with simplified status logic.
  • easy install. Script ensures idempotence to simplify source <whatever> logic.
  • more information at man section.

Install

cat <<EOF>>~/.bashrc
# git_status
[ -f $PWD/git_status.env ] && source $PWD/git_status.env -ps1
EOF

Man

$ source git_status.env --help

git_status
  Copyright (c) 2016
  Author: Victor Arribas <v.arribas.urjc@gmail.com>
  License: GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>
Invoke git_status provides you a BASH function called *git_status*
that holds functionality. You can expect follow output format:
[<source dir> @ <head info>]
    source dir - git's root directory
    head info  - git HEAD status (like __git_ps1)
                 color feedback is commit status:
                   * green - nothing to commit
                   * red - uncommited files (dirty workspace)
Usage:
source git_status.env [-ps1 [--no-color]|-revert]
    -ps1       - modifies PS1 to provide repo status info.
                 This arg can be passed as many times as you
                 wish. Script ensures idempotence to simplify
                 *source <whatever>* logic.
    --no-color - plain text mode.
                 Character '*' hints about uncommited files.
                 Modifies PS1 in any case.
    -revert    - revert PS1 variable to original state.

$ git_status --help

git_status
  Copyright (c) 2016
  Author: Victor Arribas <v.arribas.urjc@gmail.com>
  License: GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>
gives status info of every git repository in current directory tree.
repositories are alphabetically processed for better reading.
expected to be used in frameworks or workspaces with several projects.

You can expect follow output format:
[*source dir* @ *head info*]
*git status --short*
*new line*
Explain:
    source dir - git's root directory
    head info  - git HEAD status (like __git_ps1)
                 color feedback is commit status:
                   * green - nothing to commit
                   * red - uncommited files (dirty workspace)

Usage: git_status [--no-color | --color] [--short | --long | --full]
  --no-color - disable echoing colors. '*' means dirty workspace
  --color    - enable echoing colors (default)
  --short    - prints git repo name
  --long     - prints dir relative to \$PWD (default)
  --full     - prints absolute directory to git repo

License

You are freely to use, fork, improve and enjoy it.

About

A `git status` meaningful for big projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages