jasmine214--love

          只有當你的內心總是充滿快樂、美好的愿望和寧靜時,你才能擁有強壯的體魄和明朗、快樂或者寧靜的面容。
          posts - 731, comments - 60, trackbacks - 0, articles - 0

          定制Git

          Posted on 2011-05-10 14:23 幻海藍夢 閱讀(657) 評論(0)  編輯  收藏 所屬分類: 版本管理

          定制Git

          git config

          更改你的編輯器

          $ 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的文檔

          $ git config color.branch auto
          $ git config color.diff auto
          $ git config color.interactive auto
          原文:http://gitbook.liuhui998.com/5_7.html
          $ 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文檔.

          主站蜘蛛池模板: 米脂县| 慈溪市| 许昌县| 龙州县| 当涂县| 友谊县| 尉犁县| 满洲里市| 麻阳| 济阳县| 仁化县| 汝城县| 新津县| 随州市| 光山县| 缙云县| 潜山县| 运城市| 察哈| 临沧市| 灵川县| 济宁市| 昌图县| 凤冈县| 宁都县| 东海县| 河东区| 班戈县| 珲春市| 仁化县| 铁岭市| 南澳县| 邯郸县| 安多县| 手游| 克山县| 江西省| 黄梅县| 海丰县| 北碚区| 峨眉山市|