日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > Ubuntu >内容正文

Ubuntu

ubuntu16.04下面git与github对应起来

發(fā)布時(shí)間:2023/12/20 Ubuntu 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ubuntu16.04下面git与github对应起来 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

參考鏈接:

https://www.jianshu.com/p/6c61b13e8bdb

上面的參考鏈接中的流程先全部搞一遍。然后進(jìn)行下面的:

然后首先在網(wǎng)頁(yè)上的github(當(dāng)然是自己要有賬號(hào)了)建立一個(gè)repository,名字叫python
建完后
回到自己的電腦ubuntu系統(tǒng)中,在自己選擇的路徑下:
git init python
cd python
git remote add origin https://github.com/appleyuchi/python.git
touch pythontest
(隨便建立一個(gè)pythontest文件)
git status(把終端的結(jié)果中紅色的都在后面的git add中加上,這個(gè)status的意思是看哪些文件github中沒(méi)有,但是本地有)
git add pythontest
git commit(輸入這條命令后會(huì)彈出下面的東西)
--------------------

python test(這里填寫(xiě)版本所做的更改)
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
#
# Initial commit
#
# Changes to be committed:
#? ? ? ?new file:? ?pythontest
#
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[ Read 10 lines ]
^G Get Help? ^O Write Out ^W Where Is? ^K Cut Text? ^J Justify? ?^C Cur Pos
^X Exit? ? ? ^R Read File ^\ Replace? ?^U Uncut Text^T To Spell? ^_ Go To Line


---------------------
按下Ctrl+x退出

git push -u origin master
Username for 'https://github.com': appleyuchi
Password for 'https://appleyuchi@github.com':?
Counting objects: 3, done.
Writing objects: 100% (3/3), 209 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/appleyuchi/python.git
?* [new branch]? ? ? master -> master

Branch master set up to track remote branch master from origin.

最終效果如下:


可以看到在本地電腦新建的文件pythontest文件已經(jīng)傳到github上去了。

以后日常使用的時(shí)候,只需要進(jìn)行以下四步即可。

git status

git add 一大堆文件名(用空格隔開(kāi))

git commit

git push

總結(jié)

以上是生活随笔為你收集整理的ubuntu16.04下面git与github对应起来的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。