python 高级码农成才之路

Git版本控制系统-----不同的个人操作git

2020-09-17  本文已影响0人  幼姿沫

个人开发git流程

一   远程仓库添加到本地仓库的说明使用

在远程仓库github中创建仓库如下

在git bash客户端进行的操作如下:

二   本地仓库数据推送到远程仓库

在已经拥有的文件夹中初始化成为本地仓库

将远程仓库中的名字命名为相同的名称


将本地仓库与远程仓库进行连接

完整的命令行显示


lenovo@LAPTOP-TFVLBBKE MINGW64 /d/Flask项目设计/penetration_test

$ git init

Initialized empty Git repository in D:/Flask椤圭洰璁捐/penetration_test/.git/

lenovo@LAPTOP-TFVLBBKE MINGW64 /d/Flask项目设计/penetration_test (master)

$ git add *

lenovo@LAPTOP-TFVLBBKE MINGW64 /d/Flask项目设计/penetration_test (master)

$ git commit -m '初始化本地仓话'

[master (root-commit) d7fec91] 鍒濆鍖栨湰鍦颁粨璇? 3 files changed, 172 insertions(+)

create mode 100644 files/__init__.py

create mode 100644 files/dir.txt

create mode 100644 files/statusCode.py

lenovo@LAPTOP-TFVLBBKE MINGW64 /d/Flask项目设计/penetration_test (master)

$ git remote add origin git@github.com:huangyongxin1998/penetration_test.git

lenovo@LAPTOP-TFVLBBKE MINGW64 /d/Flask项目设计/penetration_test (master)

$ git pull origin master  --allow-unrelated-historie

warning: no common commits

remote: Enumerating objects: 4, done.

remote: Counting objects: 100% (4/4), done.

remote: Compressing objects: 100% (3/3), done.

remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0

Unpacking objects: 100% (4/4), 1.59 KiB | 10.00 KiB/s, done.

From github.com:huangyongxin1998/penetration_test

* branch            master    -> FETCH_HEAD

* [new branch]      master    -> origin/master

Merge made by the 'recursive' strategy.

.gitignore | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

README.md  |  2 +

2 files changed, 131 insertions(+)

create mode 100644 .gitignore

create mode 100644 README.md

lenovo@LAPTOP-TFVLBBKE MINGW64 /d/Flask项目设计/penetration_test (master)

$ git push

fatal: The current branch master has no upstream branch.

To push the current branch and set the remote as upstream, use

    git push --set-upstream origin master

lenovo@LAPTOP-TFVLBBKE MINGW64 /d/Flask项目设计/penetration_test (master)

$ git push origin master

Enumerating objects: 9, done.

Counting objects: 100% (9/9), done.

Delta compression using up to 4 threads

Compressing objects: 100% (6/6), done.

Writing objects: 100% (8/8), 2.41 KiB | 822.00 KiB/s, done.

Total 8 (delta 0), reused 0 (delta 0), pack-reused 0

To github.com:huangyongxin1998/penetration_test.git

  9849978..70d8b4f  master -> master

上一篇 下一篇

猜你喜欢

热点阅读