Windows下如何如何將項(xiàng)目上傳至GitHub誊涯?

安裝git客戶端

進(jìn)入官網(wǎng)放坏,點(diǎn)擊右側(cè)下載windows版本的軟件包

在這里插入圖片描述

·
·
在這里插入圖片描述

·
·
[圖片上傳失敗...(image-ed2e34-1598945850669)]
·
如果下載慢的話,給一個(gè)傳送門辛萍,可以快速下載:
在這里插入圖片描述

·
·
·

在這里插入圖片描述

·
雙擊安裝
在這里插入圖片描述

一直點(diǎn)擊下一步就可,安裝位置可以自己選擇一下

Github創(chuàng)建倉庫

[圖片上傳失敗...(image-f60b87-1598945850669)]
填寫項(xiàng)目名稱以及base 描述

在這里插入圖片描述

·
在git安裝目錄雙擊啟動git bash

在這里插入圖片描述

·
在這里插入圖片描述

·
使用cd 命令 轉(zhuǎn)移到預(yù)上傳的項(xiàng)目的目錄下
在這里插入圖片描述

·
輸入pwd查看當(dāng)前文件夾位置
[圖片上傳失敗...(image-b7cd03-1598945850669)]

使用如下命令創(chuàng)建git倉庫

先設(shè)置email和username

git config --global user.email 'your email'
git config --global user.name 'your name'

創(chuàng)建本地倉庫并與github倉庫關(guān)聯(lián)

git init  #將該文件夾變成Git可以管理的倉庫
git add .  #將所有文件提交到暫存區(qū)
git commit -m '說明'   #提交到版本庫中
git remote add origin https://github.com/ikm565/PyQt-QQ.git
#將本地倉庫與GitHub網(wǎng)站的倉庫進(jìn)行關(guān)聯(lián)。

github倉庫鏈接在這:
[圖片上傳失敗...(image-e57ddb-1598945850669)]
·
·
·
在將本地倉庫與GitHub網(wǎng)站上的倉庫進(jìn)行關(guān)聯(lián)后捧请,便可進(jìn)行推送了,但是在進(jìn)行推送時(shí)棒搜,GitHub網(wǎng)站上的倉庫并非是空的疹蛉,因此需要將兩者進(jìn)行合并才行。

git pull --rebase origin master #合并
git push -u origin master  #推送

在這里插入圖片描述

再次查看倉庫力麸,已經(jīng)有了項(xiàng)目:
在這里插入圖片描述

如果更新了項(xiàng)目可款,通過以下命令進(jìn)行維護(hù):

git add -A               #將文件的修改上傳到暫存區(qū)
git commit -m '說明'      #提交到本地倉庫
git push origin master   #推送到GitHub倉庫

附上我的構(gòu)建過程:

pwd

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git remote add origin  https://github.com/ikm565/PyQt-QQ.git
fatal: remote origin already exists.

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git remote add origin https://github.com/ikm565/PyQt-QQ.git
fatal: remote origin already exists.

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git pull --rebase origin master
fatal: 'pwd' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git init
Reinitialized existing Git repository in D:/workspace/python Workspace/py-communicate-final/.git/

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git add .

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git commit -m 'first git'
On branch master
nothing to commit, working tree clean

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git init
Reinitialized existing Git repository in D:/workspace/python Workspace/py-communicate-final/.git/

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git init
Initialized empty Git repository in D:/workspace/python Workspace/py-communicate-final/.git/

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git add .
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .idea/inspectionProfiles/profiles_settings.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Dialog_add.ui.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in frist.qrc.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in group.ui.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in login.ui.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in main_interface.ui.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in single_person.ui.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in web绔?.idea/dbnavigator.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in web绔?.idea/flasky.iml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in web绔?.idea/misc.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in web绔?.idea/modules.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in web绔?.idea/vcs.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in web绔?.idea/workspace.xml.
The file will have its original line endings in your working directory

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git commit -m 'first git'
[master (root-commit) 21e64c4] first git
 83 files changed, 5155 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 .idea/inspectionProfiles/profiles_settings.xml
 create mode 100644 .idea/misc.xml
 create mode 100644 .idea/modules.xml
 create mode 100644 .idea/pyqt5-QQ.iml
 create mode 100644 .idea/workspace.xml
 create mode 100644 Dialog_add.py
 create mode 100644 Dialog_add.ui
 create mode 100644 frist.qrc
 create mode 100644 group.py
 create mode 100644 group.ui
 create mode 100644 image/Icon_head.jpeg
 create mode 100644 image/Icon_head.png
 create mode 100644 image/Icon_logger.png
 create mode 100644 image/Icon_user.png
 create mode 100644 image/QQ1.jpg
 create mode 100644 image/QQicon.ico
 create mode 100644 image/contact_green.png
 create mode 100644 image/icon.jpg
 create mode 100644 image/myicon_1.jpeg
 create mode 100644 image/myicon_1.png
 create mode 100644 image/partjob.png
 create mode 100644 image/qq.jpeg
 create mode 100644 image/wechat.png
 create mode 100644 login.py
 create mode 100644 login.ui
 create mode 100644 main_interface.py
 create mode 100644 main_interface.ui
 create mode 100644 res/0.jpg
 create mode 100644 res/1.jpg
 create mode 100644 res/10.jpg
 create mode 100644 res/11.jpg
 create mode 100644 res/12.jpg
 create mode 100644 res/13.jpg
 create mode 100644 res/14.jpg
 create mode 100644 res/15.jpg
 create mode 100644 res/16.jpg
 create mode 100644 res/16.png
 create mode 100644 res/17.jpg
 create mode 100644 res/18.jpg
 create mode 100644 res/19.jpg
 create mode 100644 res/2.jpg
 create mode 100644 res/20.jpg
 create mode 100644 res/21.jpg
 create mode 100644 res/22.jpg
 create mode 100644 res/23.jpg
 create mode 100644 res/24.jpg
 create mode 100644 res/25.jpg
 create mode 100644 res/3.jpg
 create mode 100644 res/4.jpg
 create mode 100644 res/5.jpg
 create mode 100644 res/6.jpg
 create mode 100644 res/7.jpg
 create mode 100644 res/8.jpg
 create mode 100644 res/9.jpg
 create mode 100644 res/default.ico
 create mode 100644 res/log.ico
 create mode 100644 server.py
 create mode 100644 server_downloads/0.jpg
 create mode 100644 server_downloads/1.jpg
 create mode 100644 server_downloads/13.jpg
 create mode 100644 server_downloads/4.jpg
 create mode 100644 server_downloads/6.jpg
 create mode 100644 server_downloads/7.jpg
 create mode 100644 single_person.py
 create mode 100644 single_person.ui
 create mode 100644 test/test.py
 create mode 100644 test/test2.py
 create mode 100644 "web\347\253\257/.idea/dbnavigator.xml"
 create mode 100644 "web\347\253\257/.idea/flasky.iml"
 create mode 100644 "web\347\253\257/.idea/misc.xml"
 create mode 100644 "web\347\253\257/.idea/modules.xml"
 create mode 100644 "web\347\253\257/.idea/vcs.xml"
 create mode 100644 "web\347\253\257/.idea/workspace.xml"
 create mode 100644 "web\347\253\257/__init__.py"
 create mode 100644 "web\347\253\257/config.py"
 create mode 100644 "web\347\253\257/register/__init__.py"
 create mode 100644 "web\347\253\257/register/main_app.py"
 create mode 100644 "web\347\253\257/register/templates/change.html"
 create mode 100644 "web\347\253\257/register/templates/change_after.html"
 create mode 100644 "web\347\253\257/register/templates/change_sign.html"
 create mode 100644 "web\347\253\257/register/templates/loginin.html"
 create mode 100644 "web\347\253\257/register/templates/regist.html"

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git remote add origin https://github.com/ikm565/PyQt-QQ.git

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git pull --rebase origin master
fatal: couldn't find remote ref master

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git push -u origin master
Enumerating objects: 88, done.
Counting objects: 100% (88/88), done.
Delta compression using up to 8 threads
Compressing objects: 100% (85/85), done.
Writing objects: 100% (88/88), 437.98 KiB | 13.27 MiB/s, done.
Total 88 (delta 14), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (14/14), done.
To https://github.com/ikm565/PyQt-QQ.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git ass -A
git: 'ass' is not a git command. See 'git --help'.

The most similar commands are
        add
        askpass
        lfs
        stash

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git add -A

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ git commit -m 'first git'
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$ ^C

20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master)
$

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市克蚂,隨后出現(xiàn)的幾起案子闺鲸,更是在濱河造成了極大的恐慌,老刑警劉巖埃叭,帶你破解...
    沈念sama閱讀 211,743評論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件摸恍,死亡現(xiàn)場離奇詭異,居然都是意外死亡赤屋,警方通過查閱死者的電腦和手機(jī)立镶,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,296評論 3 385
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來类早,“玉大人媚媒,你說我怎么就攤上這事≥罕迹” “怎么了欣范?”我有些...
    開封第一講書人閱讀 157,285評論 0 348
  • 文/不壞的土叔 我叫張陵,是天一觀的道長令哟。 經(jīng)常有香客問我恼琼,道長,這世上最難降的妖魔是什么屏富? 我笑而不...
    開封第一講書人閱讀 56,485評論 1 283
  • 正文 為了忘掉前任晴竞,我火速辦了婚禮,結(jié)果婚禮上狠半,老公的妹妹穿的比我還像新娘噩死。我一直安慰自己颤难,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,581評論 6 386
  • 文/花漫 我一把揭開白布已维。 她就那樣靜靜地躺著行嗤,像睡著了一般。 火紅的嫁衣襯著肌膚如雪垛耳。 梳的紋絲不亂的頭發(fā)上栅屏,一...
    開封第一講書人閱讀 49,821評論 1 290
  • 那天,我揣著相機(jī)與錄音堂鲜,去河邊找鬼栈雳。 笑死,一個(gè)胖子當(dāng)著我的面吹牛缔莲,可吹牛的內(nèi)容都是我干的哥纫。 我是一名探鬼主播,決...
    沈念sama閱讀 38,960評論 3 408
  • 文/蒼蘭香墨 我猛地睜開眼痴奏,長吁一口氣:“原來是場噩夢啊……” “哼蛀骇!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起抛虫,我...
    開封第一講書人閱讀 37,719評論 0 266
  • 序言:老撾萬榮一對情侶失蹤松靡,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后建椰,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 44,186評論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡岛马,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,516評論 2 327
  • 正文 我和宋清朗相戀三年棉姐,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片啦逆。...
    茶點(diǎn)故事閱讀 38,650評論 1 340
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡伞矩,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出夏志,到底是詐尸還是另有隱情乃坤,我是刑警寧澤,帶...
    沈念sama閱讀 34,329評論 4 330
  • 正文 年R本政府宣布沟蔑,位于F島的核電站湿诊,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏瘦材。R本人自食惡果不足惜厅须,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,936評論 3 313
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望食棕。 院中可真熱鬧朗和,春花似錦错沽、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,757評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至忆植,卻和暖如春镰禾,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背唱逢。 一陣腳步聲響...
    開封第一講書人閱讀 31,991評論 1 266
  • 我被黑心中介騙來泰國打工吴侦, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人坞古。 一個(gè)月前我還...
    沈念sama閱讀 46,370評論 2 360
  • 正文 我出身青樓备韧,卻偏偏與公主長得像,于是被迫代替她去往敵國和親痪枫。 傳聞我的和親對象是個(gè)殘疾皇子织堂,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,527評論 2 349