https://pan.baidu.com/s/1miFU8mkgit
https://mirrors.aliyun.com/centos/github
http://blog.51cto.com/fengyunshan911/1952566centos
# yum install git -y
ssh
https://github.com/工具
輸入完ssh-keygen一直按回車結束 spa
查看公鑰.net
填寫到github3d
[root@localhost ~]# git config --global user.name "fengxiaoqing"
[root@localhost ~]# git config --global user.email "fy88fy@163.com"
[root@localhost ~]# git clone git@github.com:fy88fy/studypy.git
正克隆到 'studypy'...
The authenticity of host 'github.com (52.74.223.119)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
RSA key fingerprint is MD5:16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,52.74.223.119' (RSA) to the list of known hosts.
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
接收對象中: 100% (3/3), done.
[root@localhost ~]# ls
anaconda-ks.cfg studypy
[root@localhost ~]# cd studypy/
[root@localhost studypy]# ls
README.mdcode
[root@localhost studypy]# touch test.md
對象
[root@localhost studypy]# ls
README.md test.md
[root@localhost studypy]# git add test.md
[root@localhost studypy]# git commit -m "add test.md"
[dev 794d8d5] add test.md
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test.md
[root@localhost studypy]# git push origin dev
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 269 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:fy88fy/studypy.git
22c5482..794d8d5 dev -> dev
[root@localhost studypy]#
我提交到的是dev分支,沒有dev分支能夠直接提交到master上命令是git push origin master
到github中查看: