jasmine214--love

          只有當(dāng)你的內(nèi)心總是充滿快樂(lè)、美好的愿望和寧?kù)o時(shí),你才能擁有強(qiáng)壯的體魄和明朗、快樂(lè)或者寧?kù)o的面容。
          posts - 731, comments - 60, trackbacks - 0, articles - 0

          定制Git

          Posted on 2011-05-10 14:23 幻海藍(lán)夢(mèng) 閱讀(658) 評(píng)論(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.*選項(xiàng)請(qǐng)參見(jiàn)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

          或者你可以通過(guò)color.ui選項(xiàng)把顏色全部打開(kāi):

          $ git config color.ui true

          提交模板

          $ git config commit.template '/etc/git-commit-template'

          日志格式

          $ git config format.pretty oneline

          其他配置選項(xiàng)

          除上面提到的選項(xiàng)外, 還有很多很有趣的選項(xiàng)去配置打包, 垃圾回收, 合并, 分支, http傳輸, diff, 分頁(yè), 空白字符等等的行為. 如果你需要更加深入地調(diào)教git, 請(qǐng)閱讀git config文檔.

          主站蜘蛛池模板: 辽宁省| 博罗县| 垣曲县| 平南县| 西和县| 儋州市| 徐汇区| 阿克陶县| 固原市| 泰和县| 德州市| 青川县| 柏乡县| 方山县| 南陵县| 永嘉县| 安阳县| 建阳市| 鲁山县| 清水河县| 宁国市| 杨浦区| 石嘴山市| 东安县| 景德镇市| 襄汾县| 邛崃市| 竹溪县| 阳曲县| 迭部县| 都昌县| 贡觉县| 井陉县| 从江县| 南京市| 丽水市| 南江县| 八宿县| 弥渡县| 台北县| 乌海市|