DEV Community

vicky17d
vicky17d

Posted on

Shorten Git Commands

If you type the following commands, you are wasting a lot of ‘seconds’ during your day:

git checkout
git branch
git commit
git status

Just go to a terminal or command prompt on your computer and type the following commands

git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status

Now, you can see run the commands

git co
git br
git ci
git st

and so on...
This may look like minimal time saving, but this can save you tons of time and typing in the long term.

(Since these aliases are being written to your global .gitconfig file, these commands are available from each and every repo on your system.)

Top comments (0)