DEV Community

Cover image for Use Git Alias To Become Pro
N. R. Ashwin
N. R. Ashwin

Posted on

Use Git Alias To Become Pro

Git alias very good feature of the Git which make you pro.
Every Git user must use to fast and essay to remember big Git command.
As Git have simple command but some time useful command is big we can make alias of that command and use simple in daily purpose.

In Git alias feature we can make the alias of the multiple chaining command this is much help full the developer to focus on our task.
In modern era without Git development is like play cricket without Umpire. Git aliases save a small amount of time, but many small savings add up to a big time saver for developers.

Alias provide us to make funny command and familiar command. Using this make we can our own command.
This is more helpful on the server due on server fast work is more needed.

Let's see how to make the Git alias in own System:-
Syntax:

git config --global alias.[alias_name] "[command]"   
Enter fullscreen mode Exit fullscreen mode

Let's take an example:

git config --global alias.ss "status"
Enter fullscreen mode Exit fullscreen mode

List all the alias:-

git config --get-regexp alias
Enter fullscreen mode Exit fullscreen mode

Remove alias command:-

git config --global --unset alias.ss
Enter fullscreen mode Exit fullscreen mode

Note: Alias command is saved in your local system defined using git config and stored in configuration files—either globally in ~/.gitconfig or locally in a repository’s .git/config.

Top comments (0)