安装git
C:\Users\Administrator>docker run -it develop
[root@9d89d5755f8b /]# yum install gtest
...
Installed:
git.x86_64 0:1.8.3.1-20.el7
Dependency Installed:
fipscheck.x86_64 0:1.4.1-6.el7 fipscheck-lib.x86_64 0:1.4.1-6.el7 less.x86_64 0:458-9.el7
libedit.x86_64 0:3.0-12.20121213cvs.el7 openssh.x86_64 0:7.4p1-16.el7 openssh-clients.x86_64 0:7.4p1-16.el7
perl-Error.noarch 1:0.17020-2.el7 perl-Git.noarch 0:1.8.3.1-20.el7 perl-TermReadKey.x86_64 0:2.30-20.el7
rsync.x86_64 0:3.1.2-4.el7
Complete!
例如,clone gtest到本地
[root@9d89d5755f8b /]# mkdir gtest
[root@9d89d5755f8b /]# cd gtest
[root@9d89d5755f8b gtest]# git init
Initialized empty Git repository in /gtest/.git/
[root@9d89d5755f8b gtest]# git clone https://github.com/google/googletest.git
Cloning into 'googletest'...
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 16379 (delta 7), reused 14 (delta 5), pack-reused 16354
Receiving objects: 100% (16379/16379), 5.69 MiB | 163.00 KiB/s, done.
Resolving deltas: 100% (12065/12065), done.
[root@9d89d5755f8b gtest]# ls
googletest
- git init
- git add
- git commit -m""
添加远程仓库后 - git remote add xxx [url]
- git push xxx master
网友评论