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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

Windows下如何如何将项目上传至GitHub?

發布時間:2024/8/23 windows 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Windows下如何如何将项目上传至GitHub? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

安裝git客戶端

進入官網,點擊右側下載windows版本的軟件包

·
·

·
·

·
如果下載慢的話,給一個傳送門,可以快速下載:

·
·
·

·
雙擊安裝

一直點擊下一步就可,安裝位置可以自己選擇一下

Github創建倉庫


填寫項目名稱以及base 描述

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


·

·
使用cd 命令 轉移到預上傳的項目的目錄下

·
輸入pwd查看當前文件夾位置

使用如下命令創建git倉庫

先設置email和username

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

創建本地倉庫并與github倉庫關聯

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

github倉庫鏈接在這:

·
·
·
在將本地倉庫與GitHub網站上的倉庫進行關聯后,便可進行推送了,但是在進行推送時,GitHub網站上的倉庫并非是空的,因此需要將兩者進行合并才行。

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


再次查看倉庫,已經有了項目:

如果更新了項目,通過以下命令進行維護:

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

附上我的構建過程:

pwd20626@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 clean20626@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 directory20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master) $ git commit -m 'first git' [master (root-commit) 21e64c4] first git83 files changed, 5155 insertions(+)create mode 100644 .gitignorecreate mode 100644 .idea/inspectionProfiles/profiles_settings.xmlcreate mode 100644 .idea/misc.xmlcreate mode 100644 .idea/modules.xmlcreate mode 100644 .idea/pyqt5-QQ.imlcreate mode 100644 .idea/workspace.xmlcreate mode 100644 Dialog_add.pycreate mode 100644 Dialog_add.uicreate mode 100644 frist.qrccreate mode 100644 group.pycreate mode 100644 group.uicreate mode 100644 image/Icon_head.jpegcreate mode 100644 image/Icon_head.pngcreate mode 100644 image/Icon_logger.pngcreate mode 100644 image/Icon_user.pngcreate mode 100644 image/QQ1.jpgcreate mode 100644 image/QQicon.icocreate mode 100644 image/contact_green.pngcreate mode 100644 image/icon.jpgcreate mode 100644 image/myicon_1.jpegcreate mode 100644 image/myicon_1.pngcreate mode 100644 image/partjob.pngcreate mode 100644 image/qq.jpegcreate mode 100644 image/wechat.pngcreate mode 100644 login.pycreate mode 100644 login.uicreate mode 100644 main_interface.pycreate mode 100644 main_interface.uicreate mode 100644 res/0.jpgcreate mode 100644 res/1.jpgcreate mode 100644 res/10.jpgcreate mode 100644 res/11.jpgcreate mode 100644 res/12.jpgcreate mode 100644 res/13.jpgcreate mode 100644 res/14.jpgcreate mode 100644 res/15.jpgcreate mode 100644 res/16.jpgcreate mode 100644 res/16.pngcreate mode 100644 res/17.jpgcreate mode 100644 res/18.jpgcreate mode 100644 res/19.jpgcreate mode 100644 res/2.jpgcreate mode 100644 res/20.jpgcreate mode 100644 res/21.jpgcreate mode 100644 res/22.jpgcreate mode 100644 res/23.jpgcreate mode 100644 res/24.jpgcreate mode 100644 res/25.jpgcreate mode 100644 res/3.jpgcreate mode 100644 res/4.jpgcreate mode 100644 res/5.jpgcreate mode 100644 res/6.jpgcreate mode 100644 res/7.jpgcreate mode 100644 res/8.jpgcreate mode 100644 res/9.jpgcreate mode 100644 res/default.icocreate mode 100644 res/log.icocreate mode 100644 server.pycreate mode 100644 server_downloads/0.jpgcreate mode 100644 server_downloads/1.jpgcreate mode 100644 server_downloads/13.jpgcreate mode 100644 server_downloads/4.jpgcreate mode 100644 server_downloads/6.jpgcreate mode 100644 server_downloads/7.jpgcreate mode 100644 single_person.pycreate mode 100644 single_person.uicreate mode 100644 test/test.pycreate mode 100644 test/test2.pycreate 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.git20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master) $ git pull --rebase origin master fatal: couldn't find remote ref master20626@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 areaddaskpasslfsstash20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master) $ git add -A20626@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 clean20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master) $ ^C20626@LAPTOP-T9NGUSPL MINGW64 /d/workspace/python Workspace/py-communicate-final (master) $

總結

以上是生活随笔為你收集整理的Windows下如何如何将项目上传至GitHub?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。