tldr/pages/common/git-config.md

28 lines
504 B
Markdown
Raw Normal View History

2015-12-17 13:09:03 +03:00
# git config
> Get and set repository or global options.
2015-12-17 13:09:03 +03:00
- Print list of options for current repository:
2015-12-17 13:09:03 +03:00
`git config --list --local`
- Print global list of options, set in ~/.gitconfig:
2015-12-17 13:09:03 +03:00
`git config --list --global`
- Get full list of options:
2015-12-17 13:09:03 +03:00
`git config --list`
- Get value of alias.ls option:
2015-12-17 13:09:03 +03:00
`git config alias.st`
- Set option alias.ls=status in file ~/.gitconfig:
2015-12-17 13:09:03 +03:00
`git config --global alias.ls "status"`
- Remove option alias.st from ~/.gitconfig:
2015-12-17 13:09:03 +03:00
`git config --global --unset alias.st`