Install Git tools

git version control and other tools of comparison:

Git only interested in whether the whole data file changes, while most other systems only concern specific differences in file contents.

git of three states:

Has been submitted (committed), it has been modified (modified) and have been staging (staged) . Submitted indicates that the file has been safely stored in the local database; modified expressed modified a file, but not yet submitted to the depositary; has been staging represents the modified files in the next time you submit the list to be saved . Thus when we see the Git project management, file transfer of three work areas: local data Git directory, the working directory, and the staging area.

  1. If git directory holds the specific version of the file, submitted to belong to the state;
  2. If you have been modified and placed in the staging area, it belongs to have the temporary status;
  3. If since the last time out, but has not been modified into the staging area, it is modified state.

Git server to build:

General to set up git server on a Linux system,

      1. git tar compressed packet to the root /

      2. Extract the tar -zxvf

      3. Installation of dependencies

[root@itcast-01 ~]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel gcc-c++

      4. Enter the git directory cd ./git-* 

      5. Installation performed:

[root@itcast-01 git-2.9.3]# make prefix=/usr/local all
[root@itcast-01 git-2.9.3]# make prefix=/usr/local install

      6. Create git users:

Adding a Linux user, the user name git users:

[root@itcast-01 ~]# useradd git

Set git user's password

[root@itcast-01 ~]# passwd git

Switch to the user git

[root@itcast-01 ~]# su - git

     7. initialization Warehouse:

[git@itcast-01 root]$ cd
[git@itcast-01 ~]$ git init --bare taotao.git

The beginning of an empty Git repository in /home/git/taotao.git/

Guess you like

Origin www.cnblogs.com/wuba/p/11028464.html