Skip to content

Show the status of all GitHub repos contained in a directory

License

Notifications You must be signed in to change notification settings

mcgroarty/gitls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitls

A command-line tool that shows the status of all Git repositories contained in a directory.

Purpose

gitls is a utility that helps you quickly check the status of multiple Git repositories in a directory. It's particularly useful when you have many Git repositories cloned locally and want to see their status at a glance.

Features

  • Shows the status of all Git repositories in a directory
  • Displays current branch information
  • Shows remote repository URLs
  • Indicates repository status with intuitive symbols:
    • * - Unstaged changes
      • Resolution: git add <files> (to stage) or git checkout -- <files> (to discard)
    • + - Staged changes
      • Resolution: git commit -m "message" (to commit) or git reset HEAD <files> (to unstage)
    • % - Untracked files
      • Resolution: git add <files> (to track) or git clean -f (to remove, use with caution)
    • $ - Stashed changes
      • Resolution: git stash apply (to apply) or git stash drop (to discard)
    • <N - Behind remote by N commits
      • Resolution: git pull (to update) or git pull --rebase (to rebase)
    • >N - Ahead of remote by N commits
      • Resolution: git push (to send changes to remote)
    • = - Up-to-date with remote
      • No action needed
    • - - Not a git repository
      • Resolution: git init (to create a new repository)
  • Can show hidden directories (with -a/--all flag)
  • Shows summary of skipped non-repository directories

Usage

gitls [OPTIONS] [DIRECTORY]

Options

  • -a, --all Show hidden directories (starting with .)
  • -v, --verbose Show verbose information about execution
  • -u, --unchanged Include directories with no pending changes (default: only show changed)
  • -h, --help Display help message
  • --version Show version information

If no directory is specified, gitls will use the current directory.

Example Output

my-project              [main =]  git@github.com:user/my-project.git
another-project         [feature/new-feature *+%]  git@github.com:user/another-project.git
uncommitted-repo        [dev <2]  git@github.com:user/uncommitted-repo.git
ahead-repo             [main >1]  git@github.com:user/ahead-repo.git
not-a-repo             -

Skipped 3 non-repository dirs

Additional Behavior

  • If no unchanged repositories are found and the --unchanged option is used, the script will display:
    No unchanged repositories
    

Requirements

  • Bash shell
  • Git

Version

Current version: 1.1

License

BSD 3-Clause License

About

Show the status of all GitHub repos contained in a directory

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages