I want to share a shell-function called gacp
(Git Add, Commit and Push), which I came up with a few months ago and have been using about every hour since then:
# fish
function gacp
git add .
git commit -m "$argv"
git push origin HEAD
end
# bash/zsh
function gacp() {
git add .
git commit -m "$*"
git push origin HEAD
}
Usage example:
> gacp add some new crazy stuff
[master fb8dcc9] add some new crazy stuff
<...>
Enumerating objects: 12, done.
<...>
To github.com:foo/bar.git
912c95d..fb9dcc9 master -> master
No more chains with &&
and quotes for verbose messages!
Top comments (0)