Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aubreypwd/zsh-plugin-git-is-clean
A way to tell if a git repo is clean, then do something about it.
https://github.com/aubreypwd/zsh-plugin-git-is-clean
Last synced: about 2 months ago
JSON representation
A way to tell if a git repo is clean, then do something about it.
- Host: GitHub
- URL: https://github.com/aubreypwd/zsh-plugin-git-is-clean
- Owner: aubreypwd
- License: mit
- Created: 2021-08-27T19:25:06.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-19T19:43:09.000Z (about 2 years ago)
- Last Synced: 2024-01-24T19:33:41.823Z (4 months ago)
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-zsh-plugins - git-is-clean - This function will return true or false depending on if it finds out your `git` repo is dirty or not. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - git-is-clean - This function will return true or false depending on if it finds out your `git` repo is dirty or not. (Plugins / ZSH on Windows)
- awesome-zsh-plugins - git-is-clean - This function will return true or false depending on if it finds out your repo is dirty or not. (Plugins / ZSH on Windows)
README
# `git-is-clean`
This function will return `true` or `false` depending on if it finds out your repo
is dirty or not.## Usage
```bash
git-is-clean "path/to/repo" || echo "path/to/repo is dirty!"
```In this example, if `path/to/repo` is dirty it will `echo` _path/to/repo is dirty!_
## Requires
- `git`
If you use https://github.com/aubreypwd/zsh-plugin-require we will try and install dependancies automatically.
## Install
Using [antigen](https://github.com/zsh-users/antigen):
```bash
antigen bundle aubreypwd/[email protected]
```## Development
Install the package on `main`:
```bash
antigen bundle ssh://[email protected]/aubreypwd/zsh-plugin-git-is-clean
```...and contribute upstream by working in `$HOME/.antigen/bundles/aubreypwd/zsh-plugin-git-is-clean`.
## How I use this
```bash
###
# Watch repositories.
##
function __git-is-clean {
git-is-clean "$1" || ( echo "🚨 $1 is dirty" && tput bel )
}
__git-is-clean "$HOME/Repos/github.com/aubreypwd/iTerm2"
__git-is-clean "$HOME/Repos/github.com/aubreypwd/Alfred.alfredpreferences"
__git-is-clean "$HOME/Repos/github.com/aubreypwd/subl-snippets"
```