[git config](http://www.kernel.org/pub/software/scm/git/docs/git-config.html)
## 更改你的編輯器
~~~
$ git config --global core.editor emacs
~~~
## 添加別名
~~~
$ git config --global alias.last 'cat-file commit HEAD'
$ git last
tree c85fbd1996b8e7e5eda1288b56042c0cdb91836b
parent cdc9a0a28173b6ba4aca00eb34f5aabb39980735
author Scott Chacon <schacon@gmail.com> 1220473867 -0700
committer Scott Chacon <schacon@gmail.com> 1220473867 -0700
fixed a weird formatting problem
$ git cat-file commit HEAD
tree c85fbd1996b8e7e5eda1288b56042c0cdb91836b
parent cdc9a0a28173b6ba4aca00eb34f5aabb39980735
author Scott Chacon <schacon@gmail.com> 1220473867 -0700
committer Scott Chacon <schacon@gmail.com> 1220473867 -0700
fixed a weird formatting problem
~~~
## 添加顏色
所有的color.*選項請參見[git config](http://www.kernel.org/pub/software/scm/git/docs/git-config.html)的文檔
~~~
$ git config color.branch auto
$ git config color.diff auto
$ git config color.interactive auto
$ git config color.status auto
~~~
或者你可以通過color.ui選項把顏色全部打開:
~~~
$ git config color.ui true
~~~
## 提交模板
~~~
$ git config commit.template '/etc/git-commit-template'
~~~
## 日志格式
~~~
$ git config format.pretty oneline
~~~
## 其他配置選項
除上面提到的選項外, 還有很多很有趣的選項去配置打包, 垃圾回收, 合并, 分支, http傳輸, diff, 分頁, 空白字符等等的行為. 如果你需要更加深入地調教git, 請閱讀[git config](http://www.kernel.org/pub/software/scm/git/docs/git-config.html)文檔。
- 1. 介紹
- 歡迎使用Git
- GIT對象模型
- Git目錄 與 工作目錄
- Git索引
- 2. 第一步
- 安裝Git
- 安裝與初始化
- 3. 基本用法
- 獲得一個Git倉庫
- 正常的工作流程
- 分支與合并@基礎
- 查看歷史 -Git日志
- 比較提交 - Git Diff
- 分布式的工作流程
- Git標簽
- 4. 中級技能
- 忽略某些文件
- rebase
- 交互式rebase
- 交互式添加
- 儲藏
- Git樹名
- 追蹤分支
- 使用Git Grep進行搜索
- Git的撤消操作 - 重置, 簽出 和 撤消
- 維護Git
- 建立一個公共倉庫
- 建立一個私有倉庫
- 5. 高級技能
- 創建新的空分支
- 修改你的歷史
- 高級分支與合并
- 查找問題的利器 - Git Bisect
- 查找問題的利器 - Git Blame
- Git和Email
- 定制Git
- Git Hooks
- 找回丟失的對象
- 子模塊
- 6. Git生態體系
- Git 與之 Windows
- 使用Git進行系統部署
- 與 Subversion 集成
- 從其他代碼管理工具遷移到Git
- 圖形化的Git
- Git倉庫托管
- Git的其它用法
- Git的腳本支持
- Git 與編輯器
- 7. 原理解析
- Git是如何存儲對象的
- 查看Git對象
- Git引用
- Git索引
- 打包文件
- 更底層的Git
- 傳輸協議
- 術語表