1
0
Fork 0
mirror of https://github.com/Luzifer/git-recurse-status.git synced 2024-11-09 15:40:00 +00:00
git-recurse-status/README.md

57 lines
2.1 KiB
Markdown
Raw Normal View History

2016-10-28 00:18:44 +00:00
# Luzifer / git-recurse-status
Wrapper around git to display status of a whole tree of directories to detect uncommitted or not pushed changes.
## Features
- Recurse through a directory tree
- Display changes in a short manner
- Filter output by full-text search
- Filter output by a combinable set of filters
- Change format of output using Go templates
## Usage
```bash
# git-recurse-status --help
Usage of git-recurse-status:
2016-10-28 20:00:22 +00:00
-f, --filter stringSlice Attributes to filter for
2016-10-28 00:18:44 +00:00
--format string Output format (default "[{{.U}}{{.A}}{{.M}}{{.R}}{{.D}}{{.S}} {{.State}}] {{.Path}} ({{if .Remote}}{{.Remote}} » {{end}}{{.Branch}})")
2016-10-28 20:00:22 +00:00
--or Switch combining of filters from AND to OR
2016-10-28 00:18:44 +00:00
-s, --search string String to search for in output
--version Prints current version and exits
```
### Filters
Possible filters:
- By status against the remote:
- `diverged` - Local and remote do have different commits
- `ahead` - Local has new commits
- `behind` - Remote has new commits (remote repository is not automatically fetched!)
- `uptodate` - No known changes against remote
- By local changes:
2016-10-28 20:00:22 +00:00
- `untracked` - There are files not yet known to git
2016-10-28 00:18:44 +00:00
- `added` - Local files are added to the index but not yet committed
- `modified` - Local files are modified but not added to the index
- `removed` - Local files were removed but not yet deleted from the index
- `deleted` - Files are marked to be removed in the index
- `stashed` - You have changes in the stash
- `changed` - Shortcut for all local changes at once
2016-10-28 20:00:22 +00:00
- Other filters
- `remote` - Repositories having a remote named "origin" set
2016-10-28 00:18:44 +00:00
All filters mentioned above are extendable with the prefix `no-` to negate them (example: `no-changes`).
Example usage for filters:
```bash
# git recurse-status -f no-uptodate
[ →] dockerproxy_config (git@bitbucket.org:luzifer/dockerproxy_config.git » master)
[ M →] knut-ws (git@github.com:Luzifer/workstation.git » master)
# git recurse-status -f no-uptodate -f modified
[ M →] knut-ws (git@github.com:Luzifer/workstation.git » master)
```