dg - find dirty git repos
Ever forgot to push a commit or lost your work because you assumed it was pushed to Github but it wasn't?
dg
finds local git repos with pending changes, un-added files, branches that are completely new, and branches that were not pushed upstream.
Run it before you go on holiday
$ dg -b
βββββββββββββββββββββββββ¬βββββββββββββββ¬βββββββββ¬βββββββββββββββββββββββ
β repository β changes β ahead β missing β
βββββββββββββββββββββββββΌβββββββββββββββΌβββββββββΌβββββββββββββββββββββββ€
β ./logolang.org β β β master β
βββββββββββββββββββββββββΌβββββββββββββββΌβββββββββΌβββββββββββββββββββββββ€
β ./init-tslib β β β master β
βββββββββββββββββββββββββΌβββββββββββββββΌβββββββββΌβββββββββββββββββββββββ€
β ./sqlx-crud β β’β’β’β’β’β’β’β’β’β’β’β’ β β β
βββββββββββββββββββββββββΌβββββββββββββββΌβββββββββΌβββββββββββββββββββββββ€
β ./interactive-actions β β β master β
βββββββββββββββββββββββββΌβββββββββββββββΌβββββββββΌβββββββββββββββββββββββ€
β ./sign-rs β β β master β
βββββββββββββββββββββββββΌβββββββββββββββΌβββββββββΌβββββββββββββββββββββββ€
β ./teller-docs β β’β’β’ β β adding-styling-fwks, β
β β β β master, β
β β β β switch-to-theme-ui β
βββββββββββββββββββββββββΌβββββββββββββββΌβββββββββΌβββββββββββββββββββββββ€
β ./init-rs β β β implement-eject, β
β β β β master, simplified β
βββββββββββββββββββββββββΌβββββββββββββββΌβββββββββΌβββββββββββββββββββββββ€
β ./foobar3 β β’β’β’ β β β
βββββββββββββββββββββββββΌβββββββββββββββΌβββββββββΌβββββββββββββββββββββββ€
β ./pattern_match β β’β’β’β’β’β’ β β master β
βββββββββββββββββββββββββ΄βββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββ
For example - this discovered that I have local changes on sqlx-crud
, and that teller-docs
contains branches that I created locally but never pushed.
Download
$ brew tap jondot/tap && brew install dg
Otherwise, grab a release from releases.
Usage
Usage: dg [-b] [-p <path>]
dg: find dirty local Git repos with pending changes or unpushed content
Options:
-b, --branches include analysis for local branches
-p, --path root path (default ".")
--help display usage information
-V, --version print version information and exit
Contributing
We are accepting PRs. Feel free to submit PRs.
To all Contributors - you make this happen, thanks!
License
Copyright (c) 2023 @jondot. See LICENSE for further details.