安装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?相关推荐

  1. mac下如何把本地项目上传到Github(转)

    本文将介绍在mac(windows下同理)下如何将本地项目上传到 Github. 一.准备 1.注册 github 账号 地址:https://github.com 具体方法本文不做介绍啦. 2.安装 ...

  2. 如何通过TortoiseGit(小乌龟)把本地项目上传到github上

    1.第一步: 安装git for windows(链接:https://gitforwindows.org/)一路next就好了, 如果遇到什么问题可以参考我另外一篇文章~^ - ^ 2.第二步:安装 ...

  3. 使用 vscode将本地项目上传到github、从github克隆项目以及删除github上的某个文件夹...

    安装Git后,可以看到windows环境下有两个命令输入窗口Git CMD 和Git Bash Git GUI是可视化图形界面 Git中的Bash是基于CMD的,在CMD的基础上增添一些新的命令与功能 ...

  4. Git学习系列之如何正确且高效地将本地项目上传到Github(图文详解)

    不多说,直接上干货! 首先你需要一个Github账号,所以还没有的话先去注册吧! https://github.com/ 见 如何走上更高平台分享传递干货知识:(开通个人Github面向开源及私有软件 ...

  5. 怎样将项目上传到github上

    怎样将项目上传到GitHub上面ni? 登录到你的GitHub账号 1.new repository 2.填写下面的信息–>create 3.这一步要用到三个git命令. $ git clone ...

  6. GIT将本地项目上传到Github(两种简单、方便的方法)

    GIT将本地项目上传到Github(两种简单.方便的方法) 一.第一种方法: 首先你需要一个github账号,所有还没有的话先去注册吧! https://github.com/ 我们使用git需要先安 ...

  7. vscode 将本地项目上传到github、从github克隆项目以及删除github上的某个文件夹

    一.将本地项目上传到github 1.创建本地仓库(文件夹) mkdir study//创建文件夹study cd study //进入study文件夹 2.通过命令git init把这个文件夹变成G ...

  8. 如何将本地项目上传至GitHub

    如何将本地项目上传至GitHub 首先你需要一个github账号,所有还没有的话先去注册吧! https://github.com/ 我们使用git需要先安装git工具,这里给出下载地址,下载后一路直 ...

  9. git学习(10):Git的使用--如何将本地项目上传到Github(两种简单、方便的方法)

    将本地项目上传到Github(两种简单.方便的方法) 一.第一种方法: 首先你需要一个github账号,所有还没有的话先去注册吧! https://github.com/ 我们使用git需要先安装gi ...

最新文章

  1. HTTP协议中的Tranfer-Encoding:chunked编码解析
  2. freescale imx6 编译 linux ltib,TQIMX6Q技术分享——LTIB安装配置(转)
  3. java静态方法和非静态方法内存区别_static方法和非static方法的区别(java)
  4. h2 迁移到 mysql_[saiku] 将saiku自带的H2嵌入式数据库迁移到本地mysql数据库
  5. Go会接替Java,成为下一个企业级编程语言吗?
  6. Hit or Miss
  7. 基于nginx-rtmp实现电视回看业务
  8. python打开快捷方式_Python创建启动目录的快捷方式,python,到
  9. 前端学习(688):断点调试
  10. CentOS7设置自定义开机启动,添加自定义系统服务
  11. Flutter教程app
  12. 看似毫不相干,哲学与机器学习竟有如此大的交集?
  13. Hive 数据质量检测
  14. ios调用系统的短信和发送邮件功能,实现短信分享邮件分享
  15. 萤石云视频监控电脑版 v2.6.11.0官方版
  16. MAMP(win) Apache启动失败__句柄无效。 : master_main: create child process failed. Exiting.
  17. Linux内核PWN-基础ROP提权
  18. 【简单总结】SLAM 算法的 Benchmark 及相关数据集的结果对比
  19. 奶牛与农夫John与oj
  20. CentOS 6.5配置国内Yum源2016年8月1日更新

热门文章

  1. html中写色块,CSS3 彩虹色块
  2. 二建施工管理思维导图_备考二建不丢分?二建思维导图全程指导,知识点记忆快、不分散...
  3. idea插件开发(02)---相关概念介绍
  4. NSThread使用总结
  5. python time智能等待_Python Selenium智能等待
  6. 常用的python脚本_五个python常用运维脚本面试题实例
  7. open表和closed表_011 Ruby 多Word表写入Excel
  8. python中打开文件open_Python中打开文件的方式(With open)
  9. python3单例-python3如何运行文件夹python单例模式
  10. php改名下载,PHP如何给上传的文件改名