Skip to content

Instantly share code, notes, and snippets.

@yurenchen000
Last active December 27, 2019 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yurenchen000/19df909633b883fb8247a79a6a6d47c6 to your computer and use it in GitHub Desktop.
Save yurenchen000/19df909633b883fb8247a79a6a6d47c6 to your computer and use it in GitHub Desktop.
git config snippets

show config

git config --global -l

OUT:

diff.tool=vimdiff
difftool.prompt=false

alias.d=difftool
alias.dog=log --all --decorate --oneline --graph
alias.ls=ls-files
alias.st=status

add config

git config --global --add diff.tool vimdiff
git config --global --add alias.d   difftool

git config --global --add alias.ls  ls-files
git config --global --add alias.s   status
git config --global --add alias.dog 'log --all --decorate --oneline --graph'

edit config

git config --global -e

EDIT:

[alias]
        d = difftool
        st = status
        ls = ls-files
        dog = log --all --decorate --oneline --graph
[diff]
        tool = vimdiff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment