## 安装git客户端 进入官网,点击右侧下载windows版本的软件包
![8dc8af6359c00be81c0b6fe692949275.png](https://i-blog.csdnimg.cn/blog_migrate/156b2a708bfcc2bb4af0bd826c6d3781.jpeg)
· ·
![c4bf3dbf4621526255f622eb55118fdc.png](https://i-blog.csdnimg.cn/blog_migrate/161c4a472aa81b24b1aa61ab490f2d69.jpeg)
· ·
![8eda790f211ce0d6821cbbf7e7441ede.png](https://i-blog.csdnimg.cn/blog_migrate/c81002f2e821da9ef5d5f86a0102a8ba.png)
· 如果下载慢的话,给一个传送门,可以快速下载:
![970fe12515808444107afd7cbd62b103.png](https://i-blog.csdnimg.cn/blog_migrate/c2e4bafcb4a82c4094b451040fe200a3.jpeg)
· · ·
![7a5b16d20ee41aa1ac524f43a9ee9afd.png](https://i-blog.csdnimg.cn/blog_migrate/2d3f034c16c12418590b662867d8f211.jpeg)
· 双击安装
![1b7323391ff00dbc5c9f18dc83dbde68.png](https://i-blog.csdnimg.cn/blog_migrate/e258cdcdf693d58759b912a8de58d567.jpeg)
一直点击下一步就可,安装位置可以自己选择一下
Github创建仓库
![0727f6f8b9f68d11327b32e763df832c.png](https://i-blog.csdnimg.cn/blog_migrate/e2d4f6f54c95e2400f8b91000e1fd117.png)
填写项目名称以及base 描述
![ea06456817561173ce4a5eafd2db3a41.png](https://i-blog.csdnimg.cn/blog_migrate/cc14f80fd080dbcd2f997849ded63219.jpeg)
· 在git安装目录双击启动git bash
![8a38f6e2e828b62e0b4ec521cfcf4639.png](https://i-blog.csdnimg.cn/blog_migrate/90dbfbda5ba0772ae6a08b3c940b063a.jpeg)
·
![f91d9fca672b11c5e95e94c1c30ba649.png](https://i-blog.csdnimg.cn/blog_migrate/0147b3cdda0fa265e51a3c609ba51015.png)
· 使用cd 命令 转移到预上传的项目的目录下
![f19a40df70a3e86ae30c89dcc18fab35.png](https://i-blog.csdnimg.cn/blog_migrate/e78414e3da3435bdc2fee785421122bf.jpeg)
· 输入pwd查看当前文件夹位置
![66b3e696a0077de72d58d0bcd552451b.png](https://i-blog.csdnimg.cn/blog_migrate/039a587c99807ae4340144aed1ffd40c.png)
使用如下命令创建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仓库链接在这:
![6cc62c3ba042225d6ccfcc32ddc5207a.png](https://i-blog.csdnimg.cn/blog_migrate/df996cb2aa84fcb4f3319d2bca6719bd.png)
· · · 在将本地仓库与GitHub网站上的仓库进行关联后,便可进行推送了,但是在进行推送时,GitHub网站上的仓库并非是空的,因此需要将两者进行合并才行。
git pull --rebase origin master #合并
git push -u origin master #推送
![8330b92ca20ef83c4197a42a143e3e1d.png](https://i-blog.csdnimg.cn/blog_migrate/726efd2367ae7d17f28168a20bb3595a.jpeg)
再次查看仓库,已经有了项目:
![e14fc79a849e751651c806d839b1826f.png](https://i-blog.csdnimg.cn/blog_migrate/ff814d1f2420f5646c271c911d6742f5.jpeg)
如果更新了项目,通过以下命令进行维护:
git add -A #将文件的修改上传到暂存区
git commit -m '说明' #提交到本地仓库
git push origin master #推送到GitHub仓库
附上我的构建过程:
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 "web347253257/.idea/dbnavigator.xml"
create mode 100644 "web347253257/.idea/flasky.iml"
create mode 100644 "web347253257/.idea/misc.xml"
create mode 100644 "web347253257/.idea/modules.xml"
create mode 100644 "web347253257/.idea/vcs.xml"
create mode 100644 "web347253257/.idea/workspace.xml"
create mode 100644 "web347253257/__init__.py"
create mode 100644 "web347253257/config.py"
create mode 100644 "web347253257/register/__init__.py"
create mode 100644 "web347253257/register/main_app.py"
create mode 100644 "web347253257/register/templates/change.html"
create mode 100644 "web347253257/register/templates/change_after.html"
create mode 100644 "web347253257/register/templates/change_sign.html"
create mode 100644 "web347253257/register/templates/loginin.html"
create mode 100644 "web347253257/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)
$