On average, every developer commits their code at least once a day.
Having some git aliases
help you quickly make changes and push your code.
No more typos
One of my daily frustrations in the past π€¬ -
Avoiding common pitfalls are super important, it helps increase productivity in the long term.
Table of contents
- git status
- git commit
- git push
- git add and commit
- git add, commit and push
- git stash
- git stash apply
- git push --set-upstream
- git checkout
ps: These are aliases I have been using personally, feel free to create and share your own βΊοΈ
1. git status π gs
2. git commit π gc
3. git push π gp
4. git add . && git commit -m π gac
5. git add . && git commit -m && git push π gacp
6. git stash π gst
6. git stash apply π gsta
6. git push --set-upstream origin π gpst
This syntax is the one I forget the most π€·ββοΈ
6. git checkout π gco
These are the aliases that I use everyday for the past few years. No typos, no errors and super handy.