ubuntu16.04下面git与github对应起来
生活随笔
收集整理的這篇文章主要介紹了
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)題。
- 上一篇: 回调与多进程
- 下一篇: Ubuntu 16.04 LTS apt