1.前提準(zhǔn)備
1.下載并安裝好了git。
2.擁有自己的github賬號(hào)
2. 上傳步驟
1.登陸自己的github賬號(hào), 點(diǎn)擊 New repository .創(chuàng)建自己的項(xiàng)目
github地址:https://github.com/

new repository

創(chuàng)建項(xiàng)目的頁(yè)面
2.創(chuàng)建好了項(xiàng)目之后,然后是這個(gè)界面,這表示你在github上創(chuàng)建項(xiàng)目成功了,接下來(lái)你需要做的將本地的項(xiàng)目上傳到github上。

創(chuàng)建完成頁(yè)面
并復(fù)制該地址A
3.定位到項(xiàng)目地址
1). cd E:/workspace/demo2
2). git init 初始化git ,創(chuàng)建好了本地的倉(cāng)庫(kù),但是這個(gè)倉(cāng)庫(kù)是空的。

git init
3). git add . 你將你的項(xiàng)目代碼加到空的倉(cāng)庫(kù)中

git add .
4). git commit -m "第一次提交代碼" 這時(shí)候你需要準(zhǔn)備提交代碼了,

git commit
5). git remote add origin https://github.com/地址A.git 添加遠(yuǎn)程地址
6). git push origin master 這里才是真正的提交時(shí)上去了

git push
7). 最后一步,回到你的git ,刷新頁(yè)面就出來(lái)了。