配置用户名
   
  1. git config --global user.name T-bagwell
配置用户email
    
  1. git config --global user.email T-bagwell@chinaunix.net
配置默认的编辑器为vim
   
  1. git config --global core.editor vim
查看配置
  1. [root@T-bagwell P5905]# git config -l
  2. color.ui=auto
  3. user.email=T-bagwell@ChinaUnix.net
  4. user.name=T-bagwell
  5. core.editor=vim
  6. core.repositoryformatversion=0
  7. core.filemode=true
  8. core.bare=false
  9. core.logallrefupdates=true
  10. remote.origin.url=root@192.168.1.109:/root/zk/5905_7050/P5905
  11. remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
  12. branch.master.remote=origin
  13. branch.master.merge=refs/heads/master
  14. [root@T-bagwell P5905]#
这个配置有什么用呢?后面可以看到

  1. [root@T-bagwell P5905]# git log
  2. commit 24ba0f009c0923d33ddcf7bebf3128a3febc1848
  3. Author: T-bagwell <T-bagwell@ChinaUnix.net>
  4. Date: Thu Mar 3 12:18:53 2011 +0800

  5.     support rear camera at 5905 7050 version

10-01 00:01
查看更多