Git学习教程
Git 是一个 分布式的 文件版本控制系统,每个电脑都有一个 完整的 文件库和版本库,文件库之间可以互相推送和抓取版本信息。CVS和SVN是 集中式的 文件版本控制系统,文件库和版本信息集中存放在服务器上,每个电脑只跟服务器交互信息。 1. Git的安装 操作系统:Ubuntu 12.04LTS Git的安装命令: sudo apt-get install git 2. Git的配置 2.1. 设置Git的配置 --local option: read and write from .git/config 配置信息的作用域为当前库,配置信息存放在.git/config。 --global option: read and write from ~/.gitconfig. 配置信息的作用域为当前用户,配置信息存放在~/.gitconfig。 --system option: read and write from /etc/gitconfig, that contains value for every user. 配置信息的作用域为整个系统的所有用户,配置信息存放在/etc/gitconfig。 2.1.1 设置用户名 git config --global user.name "user name" 2.1.2 设置用户的邮箱 git config --global user