git和遠(yuǎn)程倉庫簡單操作

版本:2.12

系統(tǒng):linux

使用步驟:

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

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

2、將A克隆到本地倉庫Git_rpo下面。

[root@ZPJ Git_rpo]# git clone git@github.com:Babyzpj/DeepLearning.git

3、進(jìn)入到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


方法二:現(xiàn)在本地建立repository,再和遠(yuǎn)程的repository進(jìn)行關(guān)聯(lián)

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容