mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-06-05 05:03:16 +02:00
Create super useful gac and gacp aliases
`gac` will add all files and will open your editor to commit everything `gac 'Initial commit'` will add all files and commit with the message 'Initial commit' `gac plugins/git/git.plugin.zsh 'Create super useful gac and gacp aliases'` will add the plugin file with the commit message. You can list as many files/folders that you'd like to commit gacp has the same functionality but will also push your commit
This commit is contained in:
parent
547a6ce260
commit
81ed53dfc5
1 changed files with 22 additions and 0 deletions
|
|
@ -248,3 +248,25 @@ alias glum='git pull upstream master'
|
|||
|
||||
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
|
||||
alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify -m "--wip-- [skip ci]"'
|
||||
|
||||
gac() {
|
||||
if [ $# -ge 2 ]; then
|
||||
git add "${@: 1:-1}" && git commit -m "${@: -1}"
|
||||
elif [ $# -eq 1 ]; then
|
||||
git add -A && git commit -m "$1"
|
||||
else
|
||||
git add -A && git commit
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
gacp() {
|
||||
if [ $# -ge 2 ]; then
|
||||
git add "${@: 1:-1}" && git commit -m "${@: -1}"
|
||||
elif [ $# -eq 1 ]; then
|
||||
git add -A && git commit -m "$1"
|
||||
else
|
||||
git add -A && git commit
|
||||
fi
|
||||
git push
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue