Customizing Git - Git Configuration

by - 12:00

If u are familiar with the unix terminal and the famous .bashrc well that's almost the same.

In your home folder u should see a file called .gitconfig.
Open it and modify as u wish. Here's mine:
[user]
        .......
[core]
        autocrlf = input
[alias]
        adda = add --all
        co = commit
        ch = checkout
        st = status

        #log
        l = log --oneline --decorate --graph --branches --remotes -20
        ll = log --oneline --decorate -- graph --stat
        ls = log --oneline --decorate --graph --branches --remotes --simplify-by-decoration

        #list aliases
        alias = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
As u can see u can define an alias like in .bashrc and most important the last command provide all the alias in the config file if reequested with the alias command (as .bashrc).

Thanks to Fabrizio Monti (@delphaber)

You May Also Like

0 commenti