04-克隆仓库

    xiaoxiao2022-07-06  194

    克隆GitHub代码仓库

    [root@localhost ~]# mkdir test [root@localhost ~]# cd test [root@localhost test]# pwd /root/test [root@localhost test]# git clone git@github.com:gjjcommon/remote_repo.git Cloning into 'remote_repo'... Warning: Permanently added the RSA host key for IP address '52.74.223.119' to the list of known hosts. remote: Enumerating objects: 3, done. remote: Counting objects: 100% (3/3), done. remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0 Receiving objects: 100% (3/3), done. Checking connectivity... done. [root@localhost test]# [root@localhost test]# ls remote_repo [root@localhost test]# cd remote_repo/ [root@localhost remote_repo]# ls README.md [root@localhost remote_repo]# echo "test code clone" > test.txt [root@localhost remote_repo]# git add test.txt [root@localhost remote_repo]# git commit -m "second commit" [master 84c829f] second commit 1 file changed, 1 insertion(+) create mode 100644 test.txt [root@localhost remote_repo]# git push Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hosts. Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 281 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To git@github.com:gjjcommon/remote_repo.git 5647aeb..84c829f master -> master

    上传完毕后去GitHub页面查看是否新增文件

    最新回复(0)