Last Updated: September 09, 2019
·
994
· m3tr0z

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"