Git是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。
Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。
Git 与常用的版本控制工具 CVS, Subversion 等不同,它采用了分布式版本库的方式,不必服务器端软件支持。
GIT不仅仅是个版本控制系统,它也是个内容管理系统(CMS),工作管理系统等。
Git 与 SVN 区别点:
参考:http://www.runoob.com/git/git-tutorial.html
https://git-scm.com/book/zh/v2
基本的 Git 工作流程如下:
1 [root@git ~]# yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc xmlto docbook2x #建议安装
2 [root@git ~]# yum -y install git
3 附:编译安装
4 [root@git ~]# yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc xmlto docbook2x #建议安装
5 [root@git ~]# tar -zxf git-2.0.0.tar.gz
6 [root@git ~]# cd git-2.0.0
7 [root@git git-2.0.0]# make configure
8 [root@git git-2.0.0]# ./configure --prefix=/usr
9 [root@git git-2.0.0]# make all doc info
10 [root@git git-2.0.0]# sudo make install install-doc install-html install-info
提示:相关源码包可通过https://github.com/git/git/releases下载。
/etc/gitconfig:针对全局的通用配置,可使用git config --system配置;
~/.gitconfig 或 ~/.config/git/config:针对当前用户生效的配置,可使用git config --global配置;
当前仓库目录.git/config:针对该仓库。
1 [root@git ~]# git config --global user.name "zhangsan"
2 [root@git ~]# git config --global user.email "xhy@itzgr.com"
1 [root@git ~]# git config --list
2 [root@git ~]# git config user.name #查看具体某一项配置信息
1 [root@git ~]# git help <verb>
2 [root@git ~]# git <verb> --help
3 [root@git ~]# man git-<verb>
4 [root@git ~]# git help config #获取config命令手册