https://github.com/seletskiy/zsh-git-smart-commands
Wrappers for git commands to be efficient in the shell
https://github.com/seletskiy/zsh-git-smart-commands
Last synced: 4 months ago
JSON representation
Wrappers for git commands to be efficient in the shell
- Host: GitHub
- URL: https://github.com/seletskiy/zsh-git-smart-commands
- Owner: seletskiy
- Created: 2015-06-22T09:14:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-08-12T10:46:07.000Z (over 5 years ago)
- Last Synced: 2025-03-20T00:40:01.990Z (9 months ago)
- Language: Shell
- Size: 9.77 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-zsh-plugins - git-smart-commands - Adds extra `git` commands to make some common `git` usages more efficient. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - git-smart-commands - Adds extra `git` commands to make some common `git` usages more efficient. (Plugins / ZSH on Windows)
- awesome-zsh-plugins - git-smart-commands - Adds extra `git` commands to make some common `git` usages more efficient. (Plugins / Zinit (née zplugin))
README
# zsh-git-smart-commands
Wrappers for common git commands so they can be used in aliases very
efficiently.
All commands come with default git completion.
# Installation
## zgen
```zsh
zgen load seletskiy/zsh-git-smart-commands
```
## git-smart-commit
With arguments same as `git commit -m`. Without arguments behaves like `git
commit -v`.
Also, removes necessity of quotes around commit message.
```zsh
alias c='git-smart-commit'
```
Then, commits can be done via:
```zsh
c my supper commit message
```
Autocompletion always works:
```zsh
c my blah blah --am
# ==> c my blah blah --amend
```
**Note**: quotes are not mandatory now.
## git-smart-add
```zsh
alias a='git-smart-add'
```
Without arguments will add all files in the repo to the index. Otherwise will
act as specified in commmand line.
## git-smart-push
```
alias p='git-smart-push seletskiy'
```
Seek for remote named as first argument, and if it is found,
then push changes to that remote.
Otherwise push to origin.
## git-smart-pull
```zsh
alias u='git-smart-pull'
```
If working directory is dirty, then first stash changes, pull
remote and pop changes back.
## git-smart-remote
```zsh
alias r='git-smart-remote'
```
If repo do not have remote yet, will add new remote named
origin with url specified as first argument.