git和远程仓库简单操作

版本:2.12

系统:linux

使用步骤:

方法一:直接在github上建立一个repository,然后直接clone到本地就可以了

1、在github上建一个新的repository,名字叫做DeepLearning

2、将A克隆到本地仓库Git_rpo下面。

[root@ZPJ Git_rpo]# git clone [email protected]:Babyzpj/DeepLearning.git

3、进入到DeepLearning,然后添加测试文件test.txt

      [root@ZPJ DeepLearning]# git add .

4、然后本地提交commit

     [root@ZPJ DeepLearning]# git commit -m 'DP 测试'

5、然后将该文件推动到github上面

[root@ZPJ DeepLearning]# git pull

                                     Already up-to-date.

[root@ZPJ DeepLearning]# git push

                                  Counting objects: 3, done.

                                   Compressing objects: 100% (2/2), done.

                                   Writing objects: 100% (3/3), 324 bytes | 0 bytes/s, done.

                                 Total 3 (delta 0), reused 0 (delta 0)

                                  To github.com:Babyzpj/DeepLearning.git

                                  f3381dc..b2b8244  master -> master


方法二:现在本地建立repository,再和远程的repository进行关联

git和远程仓库简单操作_第1张图片

你可能感兴趣的:(git和远程仓库简单操作)