> Git aliases: Making aliases for popular commands to save time in the terminal is one of the most effective ways to enhance your everyday workflow.
The most used Git commands like checkout, commit, etc. can be made into aliases using the following commands:
-> git config –global alias.co checkout
-> git config –global alias.ct commit
Now, we only need to type “git co main” rather than “git checkout main”. Likewise, type “git ct main” rather than “git commit main”.
We can also edit directly the .gitconfig file for the same purpose:
[alias]
co = checkout
ct = commit