> For the complete documentation index, see [llms.txt](https://wikinote.gitbook.io/git-learning/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wikinote.gitbook.io/git-learning/git-ji-ben-ming-ling/pian-hao-she-zhi/git-config.md).

# git config

> 设置git

## 自定义Git 命令

```
git config --global alias.<custom_command_name> <commands>
```

* **参数**
  * custom\_command\_name (自定义命令名）
  * commands (命令行文字）添加!在前，可以使用git以外的命令

可以用 git config 为命令设置别名

```bash
$ git config --global alias.last 'log -1 HEAD'

$ git config --global alias.visual '!gitk'
```
