git add .
git commit -m "message"
git push origin <branch>
Are you tired with writing this kind of multiple git commands?
Do you prefer using a single command to do this?
I have created an npm CLI package to do the job for you.
git-quick
What is this? π
This npm CLI can execute multiple git commands only using a single command line.
Let's get the above git command example.
now that three-line execution you can execute in a single line using the git-quick.
giq p "commit message" <branch>
not only this. but there are more π
You can see all of them in the documentation.
I'm inviting you all to try this. If you like, don't forget to give feedback β€ and a Starβ on the github repo
If you found any issues, open a New Issue in my git repo. β¨
Any contribution is welcome.ππ
Top comments (6)
giq p is not consistent. If you pass 3 args - it will add all files and push with message, but if less - it will just push.
Also, as Duncan says - why we need install node for this kind of things? I believe shell is better for this kind of scripts.
I suggest you take attention on shell aliases.
For example - alias gad="git add", alias gcm="git commit -m" and so on.
To create multicommand tasks you can simply create shell function:
I got curious about publishing an npm package. So that's why I used node. I'm happy to look at your recommendations.
So, first of all. I don't like shortcuts for just adding all changes & pushing them immedietly. IMHO - unless you review every change beforehand - this is bad practise.
git add --interactive
is a great builtin tool to review your changes before committing them.Then most of the quick-command cand be done with git aliases which do note require a whole node process.
Here is an example from my global git-config:
Also, for someone who's apparently into optimising his git-workflow, you should try to make more meaningful commit-messages. Looking over the commit-log of your repo, all I see is "updated". Please for the sake of the people who want to work with you on the same projects read this short article about git commit-messages
Thank you for your feedback. Next time I follow good practices.
Why did you choose node for this instead of sh or bash?
I got curious about publishing an npm package. that's why I used node.