mirror of https://github.com/CrimsonTome/tldr.git
30 lines
601 B
Markdown
30 lines
601 B
Markdown
# git
|
|
|
|
> Distributed version control system.
|
|
> Some subcommands such as `git commit` have their own usage documentation.
|
|
> More information: <https://git-scm.com/>.
|
|
|
|
- Check the Git version:
|
|
|
|
`git --version`
|
|
|
|
- Show general help:
|
|
|
|
`git --help`
|
|
|
|
- Show help on a Git subcommand (like `commit`, `log`, etc.):
|
|
|
|
`git help {{subcommand}}`
|
|
|
|
- Execute a Git subcommand:
|
|
|
|
`git {{subcommand}}`
|
|
|
|
- Execute a Git subcommand on a custom repository root path:
|
|
|
|
`git -C {{path/to/repo}} {{subcommand}}`
|
|
|
|
- Execute a Git subcommand with a given configuration set:
|
|
|
|
`git -c '{{config.key}}={{value}}' {{subcommand}}`
|