binghai03 发表于 2018-1-14 11:17:30

在阿里云的Ubuntu ECS instance 使用Apt-get安装git

  root@iZ2ze40ubs5g1jr3rgylpfZ:/usr/local# apt-get install git
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following extra packages will be installed:
  git-man liberror-perl
  Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn git-email git-
  gui gitk gitweb
  The following NEW packages will be installed:
  git git-man liberror-perl
  0 upgraded, 3 newly installed, 0 to remove and 235 not upgraded.
  Need to get 6,759 kB of archives.
  After this operation, 15.2 MB of additional disk space will be used.
  Do you want to continue ? Y
  Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu/ precise/main liberror-perl all 0.17-1
  Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu/ precise-security/main git-man all 1:1.7.9.5-
  1ubuntu0.3
  Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu/ precise-security/main git amd64 1:1.7.9.5-
  1ubuntu0.3
  Fetched 6,759 kB in 1s (4,334 kB/s)
  Selecting previously unselected package liberror-perl.
  (Reading database ... 54216 files and directories currently installed.)
  Unpacking liberror-perl (from .../liberror-perl_0.17-1_all.deb) ...
  Selecting previously unselected package git-man.
  Unpacking git-man (from .../git-man_1%3a1.7.9.5-1ubuntu0.3_all.deb) ...
  Selecting previously unselected package git.
  Unpacking git (from .../git_1%3a1.7.9.5-1ubuntu0.3_amd64.deb) ...
  Processing triggers for man-db ...
  Setting up liberror-perl (0.17-1) ...
  Setting up git-man (1:1.7.9.5-1ubuntu0.3)
  root@iZ2ze40ubs5g1jr3rgylpfZ:/usr/local/GitRepo/HelloWorld# touch test.txt
  root@iZ2ze40ubs5g1jr3rgylpfZ:/usr/local/GitRepo/HelloWorld# git add test.txt
  root@iZ2ze40ubs5g1jr3rgylpfZ:/usr/local/GitRepo/HelloWorld# git commit -m 'deliver new test file'
deliver new test file
  0 files changed
  create mode 100644 test.txt
  root@iZ2ze40ubs5g1jr3rgylpfZ:/usr/local/GitRepo/HelloWorld# git push origin
  Username for 'https://github.com': guoguangzhi
  Password for 'https://guoguangzhi@github.com':
  To https://github.com/guoguangzhi/HelloWorld.git
  b50d8e8..01bbaa1master -> master
页: [1]
查看完整版本: 在阿里云的Ubuntu ECS instance 使用Apt-get安装git