【git安装操作】

[root@hadoop0 ~]# git

-bash: git: command not found

[root@hadoop0 ~]# yum install git

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

 * base: mirrors.sina.cn

 * extras: mirrors.sina.cn

 * updates: mirror.bit.edu.cn

base                                                                                                                                                                                                                | 3.7 kB     00:00     

extras                                                                                                                                                                                                              | 3.3 kB     00:00     

updates                                                                                                                                                                                                             | 3.4 kB     00:00     

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package git.i686 0:1.7.1-4.el6_7.1 will be installed

--> Processing Dependency: perl-Git = 1.7.1-4.el6_7.1 for package: git-1.7.1-4.el6_7.1.i686

--> Processing Dependency: perl(Git) for package: git-1.7.1-4.el6_7.1.i686

--> Processing Dependency: perl(Error) for package: git-1.7.1-4.el6_7.1.i686

--> Running transaction check

---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed

---> Package perl-Git.noarch 0:1.7.1-4.el6_7.1 will be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

===========================================================

 Package                          Arch        Version               Repository          Size

====================================================

Installing:

 git                               i686       1.7.1-4.el6_7.1        base              4.5 M

Installing for dependencies:

 perl-Error                        noarch     1:0.17015-4.el6         base              29 k

 perl-Git                          noarch     1.7.1-4.el6_7.1         base              28 k

 

Transaction Summary

=================================================================

Install       3 Package(s)

 

Total download size: 4.6 M

Installed size: 15 M

Is this ok [y/N]: y

Downloading Packages:

http://mirrors.sina.cn/centos/6.8/os/i386/Packages/git-1.7.1-4.el6_7.1.i686.rpm: [Errno 12] 

Timeout on http://mirrors.sina.cn/centos/6.8/os/i386/Packages/git-1.7.1-4.el6_7.1.i686.rpm: (28, 

'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')

Trying other mirror.

(1/3): git-1.7.1-4.el6_7.1.i686.rpm                                                                                                                                                                                 | 4.5 MB     01:27     

(2/3): perl-Error-0.17015-4.el6.noarch.rpm                                                                                                                                                                          |  29 kB     00:00     

(3/3): perl-Git-1.7.1-4.el6_7.1.noarch.rpm                                                                                                                                                                          |  28 kB     00:01     

------------------------------------------------------------------------------

Total                                                                                28 kB/s | 4.6 MB     02:49     

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing : 1:perl-Error-0.17015-4.el6.noarch                                                                                                                                                                                       1/3 

  Installing : git-1.7.1-4.el6_7.1.i686                                                                                                                                                                                                2/3 

  Installing : perl-Git-1.7.1-4.el6_7.1.noarch                                                                                                                                                                                         3/3 

  Verifying  : perl-Git-1.7.1-4.el6_7.1.noarch                                                                                                                                                                                         1/3 

  Verifying  : 1:perl-Error-0.17015-4.el6.noarch                                                                                                                                                                                       2/3 

  Verifying  : git-1.7.1-4.el6_7.1.i686                                                                                                                                                                                                3/3 

 

Installed:

  git.i686 0:1.7.1-4.el6_7.1                                                                                                                                                                                                               

 

Dependency Installed:

  perl-Error.noarch 1:0.17015-4.el6                  perl-Git.noarch 0:1.7.1-4.el6_7.1                                                                                   

 

Complete!

[root@hadoop0 ~]# git

usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]

           [-p|--paginate|--no-pager] [--no-replace-objects]

           [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]

           [--help] COMMAND [ARGS]

 

The most commonly used git commands are:

   add        Add file contents to the index

   bisect     Find by binary search the change that introduced a bug

   branch     List, create, or delete branches

   checkout   Checkout a branch or paths to the working tree

   clone      Clone a repository into a new directory

   commit     Record changes to the repository

   diff       Show changes between commits, commit and working tree, etc

   fetch      Download objects and refs from another repository

   grep       Print lines matching a pattern

   init       Create an empty git repository or reinitialize an existing one

   log        Show commit logs

   merge      Join two or more development histories together

   mv         Move or rename a file, a directory, or a symlink

   pull       Fetch from and merge with another repository or a local branch

   push       Update remote refs along with associated objects

   rebase     Forward-port local commits to the updated upstream head

   reset      Reset current HEAD to the specified state

   rm         Remove files from the working tree and from the index

   show       Show various types of objects

   status     Show the working tree status

   tag        Create, list, delete or verify a tag object signed with GPG

 

See 'git help COMMAND' for more information on a specific command.

[root@hadoop0 ~]# 



 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值