Wrappers for common git commands so they can be used in aliases very efficiently.
All commands come with default git completion.
zgen load seletskiy/zsh-git-smart-commands
With arguments same as
git commit -m. Without arguments behaves like
Also, removes necessity of quotes around commit message.
Then, commits can be done via:
c my supper commit message
Autocompletion always works:
c my blah blah --am<TAB> # ==> c my blah blah --amend
Note: quotes are not mandatory now.
Without arguments will add all files in the repo to the index. Otherwise will act as specified in commmand line.
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.
If working directory is dirty, then first stash changes, pull remote and pop changes back.
If repo do not have remote yet, will add new remote named origin with url specified as first argument.