As developers, when we use a git platform and sync the changes to the remote, we add a new branch, push it, and set it upstream the first time, but then all we do is write this command, again and again.
git add . && git commit -m "I didn't do it" && git push
And I have been writing for long enough and one day I thought why not make an alias of it?
And I came up with this idea, why not push my changes like this:
git commpush "Jason is responsible for the auth bug"
So to use that command I made an alias like this:
git config --global alias.commpush '!f() { git add . && git commit -m "$1" && git push; }; fâ
After that, rather then staging the changes, then committing and then pushing the changes to the remote I just say commpush.
Far better isn't it?
Follow for more.
Top comments (0)