Git add, commit and push in 1 command for the Lazy Developer
Hello Lazy developer,
so you need to push your code to see what happen on the web
1. Create a file named pusher.sh and save to disk, with the following content:
git add .
git commit -m "$3"
git push $1 $2
2. Create an alias in your bash/zsh profile like this:
alias pushrepo="sh /path/to/my/pusher.sh"
3. Reload the terminal and now you can run:
pushrepo [remote origin] [branch] "message"
example:
pushrepo origin master "fix bugs"
Written by davide
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#