文章目录

  • Git基本操作
    • 1. git 两大特点
    • 2. 安装与配置
    • 3. 创建一个版本库
    • 4.版本创建与回退
      • 4.1 使用
    • 4.2 工作区和版本库
      • 工作区 ( Working Directory )
      • 版本库 ( Repository )
    • 4.3 管理修改
    • 4.4 撤销修改
    • 4.5 对比文件的不同
    • 4.6 删除文件
  • Git 分支管理
    • 1. 概念
    • 2. 创建与合并分支
      • 小结
      • 查看分支 `git branch`
      • 创建分支 `git branch `
      • 切换分支 `git checkout `
      • 创建+切换分支 `git checkout -b `
      • 合并某分支到当前分支 `git merge `
      • 删除分支 `git branch -d `
    • 3. 解决冲突
    • 4. 分支管理策略
      • 通常合并分支时,如果可能,`git` 会采用 `Fast-forward` 模式。
      • 但是有时候 虽然没有冲突,但也不可以使用 快速合并,这时`git`(系统)会在合并之后做一次新的版本提交。
      • 在这种模式下,删除分支会丢掉分支信息。
    • 重点
      • 强制禁用 `Fast-forward` 模式,`git`在`merge`时会生成一个新的 `commit`,这样,从分支历史上就可以看出分支信息。
      • `git merge --no-ff -m "禁用Fast-forward合并" dev` . 因为本次合并要创建一个新的`commit`,所以加上` -m` 参数,把`commit` 描述写进去。
    • `git stash` 保存工作现场
    • `git stash list` 列出工作现场
    • `git stash pop` 恢复工作现场
  • Github 的使用
  • GitHub使用
      • 1. 创建仓库 Repository
      • 2. 添加 ssh 账户
        • 第一步:创建SSH
        • 第二步:登陆GitHub 配置 SSH keys
      • 3. 克隆项目
      • 4. 推送分支
      • 5. 跟踪远程
      • 6. 拉取代码
    • 小结
      • 项目一般包括两个主要分支:`Master` 和 `Dev`
      • Master : 保存发布的项目版本代码。 V1.0, V2.0 ...
      • Dev : 保存开发过程中的代码,每一个组员开发完自己的代码之后,都需要将代码发布到远程的Dev分支上。
  • 关于.gitignore更新后不生效的方法
    • 由于是后期对.gitignore 添加的内容的缘故
      • 例如,后期添加了 `venv/`,若要使添加内容生效,需要先 清除`venv/`的`git`缓存。
  • Mac系统GitHub上传项目
    • 第一步:创建SSH
    • 第二步:登陆GitHub 配置 SSH keys
    • 第三步:在GitHub新建自己的Repository,并关联到本地
      • 一、登录GitHub账号,新建Repository
      • 二、关联本地文件
  • Git 拉去Github某个分支
    • 方法一:直接获取
    • 方法二:先关联远程仓库
  • 方法三

Git基本操作

1. git 两大特点

  • 版本控制:可以解决多人同时开发的代码问题,也可以解决找回历史代码的问题

  • 分布式: Git是分布式的版本控制系统,同一个Git仓库,可以分不到不同的机器上。

    • 首先找一台电脑充当服务器的角色,7*24小时开机,其他每个人都从这个“服务器”仓库克隆一份到自己的电脑,
      并且把各自的提交 推送(commit/push) 到服务器仓库里,也可以从服务器仓库中 拉取(pull) 别人的提交。

    • 可以自己搭建这台“服务器”,也可以使用GitHub。

2. 安装与配置

  • Ubuntu 系统为例:
sudo apt-get install git
  • 安装成功之后 用git 查看相关指令说明,git version 查看版本号
[fuli@16:20:58]~/PycharmProjects/git_action$ git
usage: git [--version] [--help] [-C <path>] [-c name=value][--exec-path[=<path>]] [--html-path] [--man-path] [--info-path][-p | --paginate | --no-pager] [--no-replace-objects] [--bare][--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]<command> [<args>]These are common Git commands used in various situations:start a working area (see also: git help tutorial)clone      Clone a repository into a new directoryinit       Create an empty Git repository or reinitialize an existing onework on the current change (see also: git help everyday)add        Add file contents to the indexmv         Move or rename a file, a directory, or a symlinkreset      Reset current HEAD to the specified staterm         Remove files from the working tree and from the indexexamine the history and state (see also: git help revisions)bisect     Use binary search to find the commit that introduced a buggrep       Print lines matching a patternlog        Show commit logsshow       Show various types of objectsstatus     Show the working tree statusgrow, mark and tweak your common historybranch     List, create, or delete branchescheckout   Switch branches or restore working tree filescommit     Record changes to the repositorydiff       Show changes between commits, commit and working tree, etcmerge      Join two or more development histories togetherrebase     Reapply commits on top of another base tiptag        Create, list, delete or verify a tag object signed with GPGcollaborate (see also: git help workflows)fetch      Download objects and refs from another repositorypull       Fetch from and integrate with another repository or a local branchpush       Update remote refs along with associated objects'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.

[fuli@16:19:34]~/PycharmProjects/git_action$ git version
git version 2.15.1 (Apple Git-101)

3. 创建一个版本库

  • 新建一个目录 或者 cd到需要用git管理的目录下, 执行 git init,会生成一个.git 隐藏目录,帮助管理该目录(directory) 下的文件
[fuli@16:23:00]~/PycharmProjects/git_action$ git init
Initialized empty Git repository in /Users/fuli/PycharmProjects/git_action/.git/

4.版本创建与回退

4.1 使用

  1. git_action 目录下创建一个文件 code.txt, 编辑内容如下:
[fuli@16:23:07]~/PycharmProjects/git_action$ vim code.txt
[fuli@16:31:54]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17
  1. 使用下面两条命令可以创建一个版本
git add code.txtgit commit -m "版本注释, for instance: 版本1.123"

操作如下:

[fuli@16:47:33]~/PycharmProjects/git_action$ git log
fatal: your current branch 'master' does not have any commits yet
[fuli@16:47:39]~/PycharmProjects/git_action$ git add code.txt
[fuli@16:47:46]~/PycharmProjects/git_action$ git commit -m "版本0.01"
[master (root-commit) ba26141] 版本0.01Committer: Fuli <fuli@FulideMacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:git config --global --editAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author1 file changed, 1 insertion(+)create mode 100644 code.txt
  1. 使用 git log 可以查看版本记录
[fuli@16:48:22]~/PycharmProjects/git_action$ git log
commit ba26141703c2a4f78d055a47ffd1dc6df39de0e9 (HEAD -> master)
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 16:48:22 2020 +0800版本0.01
[fuli@16:52:14]~/PycharmProjects/git_action$
  1. 继续编辑 code.txt, 增加一行, 然后创建一个新版本,再查看日志信息。
[fuli@16:52:14]~/PycharmProjects/git_action$ vim code.txt
[fuli@16:57:15]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17This is the second line.
[fuli@16:57:18]~/PycharmProjects/git_action$ git add code.txt
[fuli@16:58:17]~/PycharmProjects/git_action$ git commit -m "版本0.02"
[master bbf036c] 版本0.02Committer: Fuli <fuli@FulideMacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:git config --global --editAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author1 file changed, 2 insertions(+)
[fuli@16:58:35]~/PycharmProjects/git_action$ git log
commit bbf036c780245dffa56052047d6b0d1bbae939d0 (HEAD -> master)
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 16:58:35 2020 +0800版本0.02commit ba26141703c2a4f78d055a47ffd1dc6df39de0e9
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 16:48:22 2020 +0800版本0.01
  • git在管理不同的版本时,只记录当前版本相较于上一个版本发生了哪些变化,不会拷贝之前版本没有修改的内容。 上两步的操作如图所示:

  1. 版本回退:若想回到之前的某一个版本,可以使用git reset --hard HEAD^

    • 其中 HEAD 表示当前最新的版本, HEAD^表示当前版本的前一个版本, HEAD^^ 表示当前版本的前前一个版本(往前回退2次).

    • 也可以使用 HEAD~1 表示当前版本的前一个版本,HEAD~100 表示当前版本的前100个版本。

# 回退到上一个版本
[fuli@16:58:45]~/PycharmProjects/git_action$ git reset --hard HEAD^
HEAD is now at ba26141 版本0.01
[fuli@17:35:02]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17
[fuli@17:35:09]~/PycharmProjects/git_action$ git log
commit ba26141703c2a4f78d055a47ffd1dc6df39de0e9 (HEAD -> master)
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 16:48:22 2020 +0800版本0.01
  • 回退之后,git并没有删除之前的信息,而是将头指针移动到了对应的位置。上面操作之后的示意图如下:
  1. 如果再想返回到最新版本,需要用到版本号信息。

    • 即 git也可以用版本号直接指定HEAD指向的版本信息,格式为 git reset --hard 版本号

    • 这里所说的版本号是 在每次 commit 之后,系统会返回版本号信息,如下

      • commit ba26141703c2a4f78d055a47ffd1dc6df39de0e9
    • 可以用 git reflog 查看之前的操作记录,该操作记录会显示每次 commit 的版本号信息。

  • 例如:重新返回到 版本0.02
# 执行 git reflog 之后,返回的每一行最前面的值 即为版本号的 前7位,可以只输入这7为 返回到其对应的版本。
[fuli@17:45:30]~/PycharmProjects/git_action$ git reflog
ba26141 (HEAD -> master) HEAD@{0}: reset: moving to HEAD^
bbf036c HEAD@{1}: commit: 版本0.02
ba26141 (HEAD -> master) HEAD@{2}: commit (initial): 版本0.01
[fuli@17:47:25]~/PycharmProjects/git_action$ git reset --hard bbf036c
HEAD is now at bbf036c 版本0.02
[fuli@17:47:46]~/PycharmProjects/git_action$ git log
commit bbf036c780245dffa56052047d6b0d1bbae939d0 (HEAD -> master)
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 16:58:35 2020 +0800版本0.02commit ba26141703c2a4f78d055a47ffd1dc6df39de0e9
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 16:48:22 2020 +0800版本0.01
[fuli@17:47:52]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17This is the second line.

4.2 工作区和版本库

工作区 ( Working Directory )

  • pc中的目录,比如当前的目录 git_action 就是一个工作区。

版本库 ( Repository )

  • 工作区有一个隐藏目录 .git,这个隐藏目录就是 git 的版本库。

    • git 版本库里存了很多东西,其中最重要的就是称为 stage 或者叫 (index) 的暂存区,还有git自动创建的第一个分支 master ,以及指向 master 的一个指针 HEAD.

    • 在创建 git 版本库时, git 自动创建了唯一一个 master 分区。 故, git commit 默认是往 master 分支上提交修改。

    • 可以理解为:需要提交的文件修改通通放到暂存区( git add 文件名 , 可以多次 add ),然后一次性提交暂存区的所有修改(一次 git commit -m "注释")。

  • 前面提到:把文件往 git 版本库中添加分两步执行。

      1. git add 文件名 把文件添加进去,实际上是把文件修改添加到了暂存区
      1. git commit -m "注释" 提交更改,实际上是把暂存区的所有内容提交到当前分支。

    1. 下面 再创建一个 code2.txt 并编辑内容为 添加一行,
    1. 然后再次编辑 code.txt 内容,在其中添加一行
[fuli@20:11:41]~/PycharmProjects/git_action$ vim code2.txt
[fuli@20:13:38]~/PycharmProjects/git_action$ cat code2.txt
This is code2's first line...
[fuli@20:13:43]~/PycharmProjects/git_action$ vim code.txt
[fuli@20:22:28]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17This is the second line.This is the third line....
    1. 使用 git status 查看当前工作树的状态。
[fuli@20:22:34]~/PycharmProjects/git_action$ git status
On branch master
Changes not staged for commit:(use "git add <file>..." to update what will be committed)(use "git checkout -- <file>..." to discard changes in working directory)modified:   code.txtUntracked files:(use "git add <file>..." to include in what will be committed)code2.txtno changes added to commit (use "git add" and/or "git commit -a")

其中,Changes not staged for commit 表示 尚未暂存椅背提交的变更,即 code.txt 修改的内容还未 git add

Untracked files 表示 未跟踪的文件,也即新建的 code2.txt 还未 git add

no changes added to commit 表示修改还未加入提交。


接着执行下面操作, 将修改添加到暂存区

[fuli@20:29:42]~/PycharmProjects/git_action$ git add code.txt code2.txt
[fuli@20:29:54]~/PycharmProjects/git_action$ git status
On branch master
Changes to be committed:(use "git reset HEAD <file>..." to unstage)modified:   code.txtnew file:   code2.txt
    1. 最后执行 git commit -m "注释"一次性把所有的修改提交到分支,创建一个版本
[fuli@20:29:59]~/PycharmProjects/git_action$ git commit -m "版本3"
[master aa4e0e8] 版本3Committer: Fuli <fuli@FulideMacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:git config --global --editAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author2 files changed, 3 insertions(+)create mode 100644 code2.txt
[fuli@20:32:17]~/PycharmProjects/git_action$ git status
On branch master
nothing to commit, working tree clean
[fuli@20:32:23]~/PycharmProjects/git_action$ git log
commit aa4e0e8732d92d5b46c6a0db37e05442ed0d84da (HEAD -> master)
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 20:32:17 2020 +0800版本3commit bbf036c780245dffa56052047d6b0d1bbae939d0
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 16:58:35 2020 +0800版本0.02commit ba26141703c2a4f78d055a47ffd1dc6df39de0e9
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 16:48:22 2020 +0800版本0.01


4.3 管理修改

  • git 管理文件:只会提交暂存区的修改来创建一个新的版本

  • 一个例子:

    • code.txt 中新增一行

    • 执行 git add <file>,将修改添加到暂存区

    • 再在code.txt 中新增一行. (这次的修改并没有 git add)

    • 执行 git commit -m "版本4", 创建一个新版本。

    • 使用 git status 查看工作树(the working tree)的状态,发现第二次修改由于没有被添加到暂存区,导致新创建的版本中没有该修改记录。

[fuli@22:53:51]~/PycharmProjects/git_action$ ls
code.txt  code2.txt
[fuli@22:53:53]~/PycharmProjects/git_action$ vim code.txt
[fuli@22:54:26]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17This is the second line.This is the third line....This is the fourth line...
[fuli@22:54:32]~/PycharmProjects/git_action$ git add code.txt
[fuli@22:54:42]~/PycharmProjects/git_action$ vim code.txt
[fuli@22:55:20]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17This is the second line.This is the third line....This is the fourth line...the new line...
[fuli@22:55:24]~/PycharmProjects/git_action$ git commit -m "版本4"
[master 7e9087b] 版本4Committer: Fuli <fuli@FulideMacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:git config --global --editAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author1 file changed, 2 insertions(+)
[fuli@22:55:41]~/PycharmProjects/git_action$ git status
On branch master
Changes not staged for commit:(use "git add <file>..." to update what will be committed)(use "git checkout -- <file>..." to discard changes in working directory)modified:   code.txtno changes added to commit (use "git add" and/or "git commit -a")

4.4 撤销修改

  • 继续 4.3 节的操作

  • 如果要撤销的修改 还未添加到暂存区

    • 可以使用 git checkout -- <file_name> 来丢弃工作区的改动。

    • 执行该操作会撤销 该文件未添加到暂存区的修改

  • 如果要撤销的修改 已经添加到暂存区

    • 限制性 git reset HEAD <file_name> 取消暂存

    • 再使用 git checkout -- <file_name> 来丢弃工作区的改动。

    • 执行该操作会撤销 该文件未添加到暂存区的修改

  • 如果要撤销的修改 已经到创建了版本记录, 即commit到了对应的分支

    • 使用之前提到的 git reset --hard <版本号>, 回退到之前版本
[fuli@23:09:10]~/PycharmProjects/git_action$ git status
On branch master
Changes not staged for commit:(use "git add <file>..." to update what will be committed)(use "git checkout -- <file>..." to discard changes in working directory)modified:   code.txt
no changes added to commit (use "git add" and/or "git commit -a")
[fuli@23:09:14]~/PycharmProjects/git_action$ git add code.txt
[fuli@23:09:24]~/PycharmProjects/git_action$ git status
On branch master
Changes to be committed:(use "git reset HEAD <file>..." to unstage)modified:   code.txt
[fuli@23:09:27]~/PycharmProjects/git_action$ git reset HEAD code.txt
Unstaged changes after reset:
M   code.txt
[fuli@23:09:41]~/PycharmProjects/git_action$ git status
On branch master
Changes not staged for commit:(use "git add <file>..." to update what will be committed)(use "git checkout -- <file>..." to discard changes in working directory)modified:   code.txt
no changes added to commit (use "git add" and/or "git commit -a")
[fuli@23:09:43]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17
This is the second line.
This is the third line....
This is the fourth line...
the new line...
[fuli@23:10:11]~/PycharmProjects/git_action$ git checkout -- code.txt
[fuli@23:10:23]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17
This is the second line.
This is the third line....
This is the fourth line...
[fuli@23:10:27]~/PycharmProjects/git_action$ git status
On branch master
nothing to commit, working tree clean

4.5 对比文件的不同

  • 用法 git diff [<options>] [<commit> [<commit>]] [--] [<path>...]

  • 对比工作区 和 版本中文件的不同

    • git diff HEAD -- <file_name>

    • 例: 继续编辑code.txt ,添加一行,

    • 对比工作区中 code.txtHEAD版本中 code.txt 的不同,执行 git diff HEAD -- code.txt

  • 对比 两个版本中 文件的不同

    • git diff HEAD HEAD^ -- <file_name>

    • 执行 git diff HEAD HEAD^ -- code.txt

[fuli@23:18:25]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17This is the second line.This is the third line....This is the fourth line...
[fuli@23:18:29]~/PycharmProjects/git_action$ vim code.txt
[fuli@23:19:08]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17This is the second line.This is the third line....This is the fourth line...neeeeeew line...................
[fuli@23:19:17]~/PycharmProjects/git_action$ git diff HEAD -- code.txt
diff --git a/code.txt b/code.txt
index 2e58d97..17c0853 100644
--- a/code.txt
+++ b/code.txt
@@ -5,3 +5,5 @@ This is the second line.This is the third line....This is the fourth line...
+
+neeeeeew line...................

  • 对比工作区 和 版本中文件的不同

4.6 删除文件

  • 无论是创建文件、编辑文件 或者是 删除文件,都是对工作区的改动。

    • 比如删除文件 code2.txt,如果想撤销,可以用撤销工作区的改动命令 git checkout -- <file_name>

    • 如果就是要 删除文件 code2.txt, 执行 rm code2.txt 物理删除,然后执行git add code2.txt 或者 git rm code2.txt将修改保存到暂存区,再git commit -m "版本注释" 创建新的版本。

  • 命令 git rm <file_name> 用于删除一个文件。 如果一个文件已经被提交到版本库,那么永远不用担心误删。但是 仍要小心,因为只能恢复文件到最新版本,这样会丢失删除文件之后所有的版本修改。

  • 如果文件没有被提交到版本库,误删就找不回来了,除非用一些扫描磁盘的工具,但也不一定找得回。

Git 分支管理

1. 概念

  • 分支在实际中有什么用呢?

    • 如果只有一个master 分支,假设我们准备开发一个新功能,但是需要两周才能完成,第一周写了50%的代码,若立刻提交,由于代码未写完,不完整的代码库会导致别人无法干活。

    • 如果等代码全部写完再一次提交,又存在丢失每天工作进度的巨大风险。

    • 现在有了分支,就不用怕了。 可以创建一个属于自己的分支,别人看不到,还继续再原来的分支上正常工作,而我们再自己的分支上干活,想提交到自己的分支就提交,直到开发完毕后,再一次性合并到原来的分支上,这样既安全,又不影响别人工作。

2. 创建与合并分支

  • 默认只有一个 master 分支,HEAD 指向 分支,分支指向分支上最新的一次版本。


  • 案例

      1. git branch 查看当前所有的分支,以及(HEAD)当前在哪个分支下工作。
      1. 执行 git checkout -b dev,创建一个dev 分支,并切换到其上进行工作。 这两步完成后的 工作树如下

      1. 在code.txt 新增一行,然后 在 dev 分支下 git addgit commit 创建版本. 该步完成后 工作树如下
    • [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-pVXFR63z-1590760377842)(./img/WechatIMG103.png)]

      1. 执行 git checkout master, 切换回 master 分支
      1. master分支下 执行 git merge dev 合并 dev 分支。此时是Fast-forward (快速合并) 方式的合并。
      1. 删除dev 分支,执行 git branch -d dev
[fuli@23:41:35]~/PycharmProjects/git_action$ git branch
* master
[fuli@18:12:12]~/PycharmProjects/git_action$ git checkout -b dev
Switched to a new branch 'dev'
[fuli@18:12:21]~/PycharmProjects/git_action$ git branch
* devmaster
[fuli@18:12:30]~/PycharmProjects/git_action$ git log --pretty=oneline
7e9087bcb1a8c8a0acdb4e1a418239160db0584b (HEAD -> dev, master) 版本4
aa4e0e8732d92d5b46c6a0db37e05442ed0d84da 版本3
bbf036c780245dffa56052047d6b0d1bbae939d0 版本0.02
ba26141703c2a4f78d055a47ffd1dc6df39de0e9 版本0.01
[fuli@18:44:48]~/PycharmProjects/git_action$ ls
code.txt  code2.txt
[fuli@18:47:08]~/PycharmProjects/git_action$ vim code.txt
[fuli@18:48:00]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17
This is the second line.
This is the third line....
This is the fourth line...
- dev branch add: new line...[fuli@18:48:04]~/PycharmProjects/git_action$ git add code.txt
[fuli@18:48:13]~/PycharmProjects/git_action$ git commit -m "dev分支提交"
[dev 2e2afc6] dev分支提交Committer: Fuli <fuli@FulideMacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:git config --global --editAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author1 file changed, 2 insertions(+), 3 deletions(-)
[fuli@18:48:29]~/PycharmProjects/git_action$ git log
commit 2e2afc61ac3edef1e18ecf24375e82aaf84a25a0 (HEAD -> dev)
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Sun Apr 19 18:48:29 2020 +0800dev分支提交commit 7e9087bcb1a8c8a0acdb4e1a418239160db0584b (master)
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 22:55:41 2020 +0800版本4commit aa4e0e8732d92d5b46c6a0db37e05442ed0d84da
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 20:32:17 2020 +0800版本3commit bbf036c780245dffa56052047d6b0d1bbae939d0
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 16:58:35 2020 +0800版本0.02commit ba26141703c2a4f78d055a47ffd1dc6df39de0e9
Author: Fuli <fuli@FulideMacBook-Pro.local>
Date:   Fri Apr 17 16:48:22 2020 +0800版本0.01
[fuli@18:48:37]~/PycharmProjects/git_action$ git log --pretty=oneline
2e2afc61ac3edef1e18ecf24375e82aaf84a25a0 (HEAD -> dev) dev分支提交
7e9087bcb1a8c8a0acdb4e1a418239160db0584b (master) 版本4
aa4e0e8732d92d5b46c6a0db37e05442ed0d84da 版本3
bbf036c780245dffa56052047d6b0d1bbae939d0 版本0.02
ba26141703c2a4f78d055a47ffd1dc6df39de0e9 版本0.01
[fuli@18:50:19]~/PycharmProjects/git_action$ git checkout master
Switched to branch 'master'
[fuli@18:53:46]~/PycharmProjects/git_action$ git log --pretty=oneline
7e9087bcb1a8c8a0acdb4e1a418239160db0584b (HEAD -> master) 版本4
aa4e0e8732d92d5b46c6a0db37e05442ed0d84da 版本3
bbf036c780245dffa56052047d6b0d1bbae939d0 版本0.02
ba26141703c2a4f78d055a47ffd1dc6df39de0e9 版本0.01
[fuli@18:53:56]~/PycharmProjects/git_action$ git branchdev
* master
[fuli@18:54:08]~/PycharmProjects/git_action$ git merge dev
Updating 7e9087b..2e2afc6
Fast-forwardcode.txt | 5 ++---1 file changed, 2 insertions(+), 3 deletions(-)
[fuli@18:56:30]~/PycharmProjects/git_action$ git log --pretty=oneline
2e2afc61ac3edef1e18ecf24375e82aaf84a25a0 (HEAD -> master, dev) dev分支提交
7e9087bcb1a8c8a0acdb4e1a418239160db0584b 版本4
aa4e0e8732d92d5b46c6a0db37e05442ed0d84da 版本3
bbf036c780245dffa56052047d6b0d1bbae939d0 版本0.02
ba26141703c2a4f78d055a47ffd1dc6df39de0e9 版本0.01[fuli@18:58:49]~/PycharmProjects/git_action$ git branch -d dev
Deleted branch dev (was 2e2afc6).
[fuli@18:59:32]~/PycharmProjects/git_action$ git branch
* master
小结
查看分支 git branch
创建分支 git branch <name>
切换分支 git checkout <name>
创建+切换分支 git checkout -b <name>
合并某分支到当前分支 git merge <name>
删除分支 git branch -d <name>

3. 解决冲突

  • masterdev2(或者任意两个欲合并的分支)起冲突,需要手动修改 冲突对应的文件, 并进行一次新的 git addgit commit 创建新的版本,即可使两个分支合并,并解决冲突。

  • git status 也可以提示 冲突对应的文件

  • 解决 Conflict之后就可以删除 dev2分支了

[fuli@19:20:03]~/PycharmProjects/git_action$ git branch
* master
[fuli@19:20:15]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17
This is the second line.
This is the third line....
This is the fourth line...
- dev branch add: new line...[fuli@19:20:34]~/PycharmProjects/git_action$ git branch dev2
[fuli@19:20:50]~/PycharmProjects/git_action$ git checkout dev2
Switched to branch 'dev2'
[fuli@19:20:59]~/PycharmProjects/git_action$ git branch
* dev2master
[fuli@19:21:07]~/PycharmProjects/git_action$ vim code.txt
[fuli@19:22:17]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17
This is the second line.
This is the third line....
This is the fourth line...
- dev branch add: new line...
this is dev2 branch add: dev2.....
[fuli@19:22:58]~/PycharmProjects/git_action$ git add code.txt
[fuli@19:23:05]~/PycharmProjects/git_action$ git commit -m "dev2分支提交"
[dev2 3bc40fe] dev2分支提交Committer: Fuli <fuli@FulideMacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:git config --global --editAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author1 file changed, 1 insertion(+), 1 deletion(-)
[fuli@19:23:19]~/PycharmProjects/git_action$ git log --pretty=oneline --graph
* 3bc40fe5ffd2f542bab9f6988d58570bee271454 (HEAD -> dev2) dev2分支提交
* 2e2afc61ac3edef1e18ecf24375e82aaf84a25a0 (master) dev分支提交
* 7e9087bcb1a8c8a0acdb4e1a418239160db0584b 版本4
* aa4e0e8732d92d5b46c6a0db37e05442ed0d84da 版本3
* bbf036c780245dffa56052047d6b0d1bbae939d0 版本0.02
* ba26141703c2a4f78d055a47ffd1dc6df39de0e9 版本0.01
[fuli@19:23:34]~/PycharmProjects/git_action$ git checkout master
Switched to branch 'master'
[fuli@19:23:50]~/PycharmProjects/git_action$ vim code.txt
[fuli@19:25:21]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17
This is the second line.
This is the third line....
This is the fourth line...
- dev branch add: new line...
master branch add: master......
[fuli@19:25:25]~/PycharmProjects/git_action$ git add code.txt
[fuli@19:25:33]~/PycharmProjects/git_action$ git commit -m "master分支提交"
[master a5027ad] master分支提交Committer: Fuli <fuli@FulideMacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:git config --global --editAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author1 file changed, 1 insertion(+), 1 deletion(-)
[fuli@19:25:47]~/PycharmProjects/git_action$ git log --pretty=oneline --graph
* a5027ad7feb05c133c237f0098d1645a8d2a27a9 (HEAD -> master) master分支提交
* 2e2afc61ac3edef1e18ecf24375e82aaf84a25a0 dev分支提交
* 7e9087bcb1a8c8a0acdb4e1a418239160db0584b 版本4
* aa4e0e8732d92d5b46c6a0db37e05442ed0d84da 版本3
* bbf036c780245dffa56052047d6b0d1bbae939d0 版本0.02
* ba26141703c2a4f78d055a47ffd1dc6df39de0e9 版本0.01
[fuli@19:25:53]~/PycharmProjects/git_action$ git merge dev2
Auto-merging code.txt
CONFLICT (content): Merge conflict in code.txt
Automatic merge failed; fix conflicts and then commit the result.
[fuli@19:26:05]~/PycharmProjects/git_action$ git status
On branch master
You have unmerged paths.(fix conflicts and run "git commit")(use "git merge --abort" to abort the merge)Unmerged paths:(use "git add <file>..." to mark resolution)both modified:   code.txtno changes added to commit (use "git add" and/or "git commit -a")
[fuli@19:26:12]~/PycharmProjects/git_action$ vim code.txt
[fuli@19:26:47]~/PycharmProjects/git_action$ cat code.txt
This is the first line. Time: 2020.04.17
This is the second line.
This is the third line....
This is the fourth line...
- dev branch add: new line...
master branch add: master......
this is dev2 branch add: dev2.....
[fuli@19:26:54]~/PycharmProjects/git_action$ git add code.txt
[fuli@19:27:03]~/PycharmProjects/git_action$ git commit -m "解决冲突Conflict"
[master 455c320] 解决冲突ConflictCommitter: Fuli <fuli@FulideMacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:git config --global --editAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author[fuli@19:27:30]~/PycharmProjects/git_action$ git log --pretty=oneline --graph
*   455c32056f8f3b7aa87ff087036adb4578aa1f10 (HEAD -> master) 解决冲突Conflict
|\
| * 3bc40fe5ffd2f542bab9f6988d58570bee271454 (dev2) dev2分支提交
* | a5027ad7feb05c133c237f0098d1645a8d2a27a9 master分支提交
|/
* 2e2afc61ac3edef1e18ecf24375e82aaf84a25a0 dev分支提交
* 7e9087bcb1a8c8a0acdb4e1a418239160db0584b 版本4
* aa4e0e8732d92d5b46c6a0db37e05442ed0d84da 版本3
* bbf036c780245dffa56052047d6b0d1bbae939d0 版本0.02
* ba26141703c2a4f78d055a47ffd1dc6df39de0e9 版本0.01
[fuli@19:27:40]~/PycharmProjects/git_action$ git branch -d dev2
Deleted branch dev2 (was 3bc40fe).

4. 分支管理策略

通常合并分支时,如果可能,git 会采用 Fast-forward 模式。
但是有时候 虽然没有冲突,但也不可以使用 快速合并,这时git(系统)会在合并之后做一次新的版本提交。
在这种模式下,删除分支会丢掉分支信息。

重点

强制禁用 Fast-forward 模式,gitmerge时会生成一个新的 commit,这样,从分支历史上就可以看出分支信息。
git merge --no-ff -m "禁用Fast-forward合并" dev . 因为本次合并要创建一个新的commit,所以加上-m 参数,把commit 描述写进去。

git stash 保存工作现场

git stash list 列出工作现场

git stash pop 恢复工作现场

Github 的使用


GitHub使用

1. 创建仓库 Repository

  • .gitignore 标记git不会跟踪的文件类型

2. 添加 ssh 账户

  • 若要使某台机器与GitHub上的Repository 交互,需要将某个pc端的 ssh公钥 添加到对应的Github账户上

第一步:创建SSH

打开终端(terminal)检测是否存在ssh:

$cd ~/.ssh

注:若提 -bash: cd: ~/.ssh: No such file or directory 那就说明.ssh文件夹不存在。

  1. 如果已存在,先将已有的ssh备份,或者将新建的ssh生成到另外的目录下。
  2. 如果不存在,通过默认的参数直接生成ssh。输入以下命令来创建ssh:
$ ssh-keygen -t rsa -C xxx@xx.com

注:xxx@xx.com 为你注册GitHub时的邮箱账号。
命令执行成功:

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/fuli/.ssh/id_rsa):    // .ssh默认路径,不输入则不修改
Enter passphrase (empty for no passphrase):       // 密码长度至少为4
Enter same passphrase again
Your identification has been saved in /Users/xxxx/.ssh/id_rsa.
Your public key has been saved in /Users/xxxx/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:mS+RjTY9yt5uRz/spUP/lBIE0Go9Xv/o+ODEKbS31W4 xxxxx@xx.com
The key's randomart image is:
+---[RSA 2048]----+
|         .o.     |
|           ..    |
|          o  .   |
|         X o..   |
|        S * o..  |
|       o * =..oo.|
|        + +.*=.+=|
|       . o.=.=B=E|
|        .oo.++=++|
+----[SHA256]-----+

SSH创建成功。

第二步:登陆GitHub 配置 SSH keys

登陆GitHub,选择Settings-->SSH Keys

Title:xxxxx@xx.com

Key:打开你生成的id_rsa.pub文件,将其中内容拷贝至此。

注:

  1. 查找id_rsa.pub文件,打开Finder,shift+command+g 输入设置的.ssh的路径(默认路径:~/.ssh)。

  2. id_rsa.pub文件可用文本编辑打开。

最后:打开终端

$ ssh -T git@github.com

测试一下你的帐号跟github连上没有, 如果出现如下提示,表示你连已经连上了.

Hi your GitHub's username! You've successfully authenticated, but GitHub does not provide shell access.

接下来就可以上传你的代码了。

3. 克隆项目

  • git clone <one github repo address>

4. 推送分支

  • 克隆到本地的项目一般会建一个分支进行开发,若开发完成,需要将分支推送到GitHub,执行git push origin fuli_dev,其中 origin 代表远程的分支(这里即GitHub),fuli_dev 是本地分支。

  • 若是第一次推送,执行上述命令之后,git会在 GitHub对应的Repository 中新建一个 fuli_dev 分支。

5. 跟踪远程

  • 本地的分支跟踪远程的分支, git branch --set-upstream-to=origin/远程分支名称 本地分支名称

    • 例如:git branch --set-upstream-to=origin/fuli_dev fuli_dev

    • 如果本地的提交版本 和 远程的不一致的话,git status会有相应提示。

6. 拉取代码

  • git pull origin <远程分支名dev_mac> 将远程的分支 dev_mac 上的代码下载并 合并 到本地所在的分支。

    • 注意 这里是 下载 并 合并

小结

项目一般包括两个主要分支:MasterDev

Master : 保存发布的项目版本代码。 V1.0, V2.0 …

Dev : 保存开发过程中的代码,每一个组员开发完自己的代码之后,都需要将代码发布到远程的Dev分支上。


关于.gitignore更新后不生效的方法

由于是后期对.gitignore 添加的内容的缘故

昨天能用pycharm写代码,发现venv文件夹更新了,
但是不想commit这些环境配置文件,就在.gitignore里面加了venv/但是发现并不起作用,
于是就google了一下,发现得在terminal中输入已下几行代码

例如,后期添加了 venv/,若要使添加内容生效,需要先 清除venv/git缓存。
git rm -r --cached venv
git add .
git commit -m 'update .gitignore'

搞定,再commit的时候.gitignore文件已经生效。

Reference
Reference2

Mac系统GitHub上传项目

  • 说到GitHub相信大家都不陌生,这里就不再赘述了。作为开源代码库以及版本控制系统,使用好了会非常受益。
  • 经常维护自己的技术博客和GitHub,在你找工作时也是加分项哟。

一、准备工作:

  1. 注册GitHub账号。https://github.com

  2. 安装Git客户端。https://git-scm.com/downloads

二、准备工作做好以后,打开终端(terminal)可以查看Git版本

$ git version
git version 2.14.1

第一步:创建SSH

打开终端(terminal)检测是否存在ssh:

$cd ~/.ssh

注:若提 -bash: cd: ~/.ssh: No such file or directory 那就说明.ssh文件夹不存在。

  1. 如果已存在,先将已有的ssh备份,或者将新建的ssh生成到另外的目录下。
  2. 如果不存在,通过默认的参数直接生成ssh。输入以下命令来创建ssh:
$ ssh-keygen -t rsa -C xxx@xx.com

注:xxx@xx.com 为你注册GitHub时的邮箱账号。
命令执行成功:

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/clyde/.ssh/id_rsa):    // .ssh默认路径,不输入则不修改
Enter passphrase (empty for no passphrase):       // 密码长度至少为4
Enter same passphrase again
Your identification has been saved in /Users/xxxx/.ssh/id_rsa.
Your public key has been saved in /Users/xxxx/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:mS+RjTY9yt5uRz/spUP/lBIE0Go9Xv/o+ODEKbS31W4 xxxxx@xx.com
The key's randomart image is:
+---[RSA 2048]----+
|         .o.     |
|           ..    |
|          o  .   |
|         X o..   |
|        S * o..  |
|       o * =..oo.|
|        + +.*=.+=|
|       . o.=.=B=E|
|        .oo.++=++|
+----[SHA256]-----+

SSH创建成功。

第二步:登陆GitHub 配置 SSH keys

登陆GitHub,选择Settings-->SSH Keys

Title:xxxxx@xx.com

Key:打开你生成的id_rsa.pub文件,将其中内容拷贝至此。

注:

  1. 查找id_rsa.pub文件,打开Finder,shift+command+g 输入设置的.ssh的路径(默认路径:~/.ssh)。

  2. id_rsa.pub文件可用文本编辑打开。

最后:打开终端

$ ssh -T git@github.com

测试一下你的帐号跟github连上没有, 如果出现如下提示,表示你连已经连上了.

Hi your GitHub's username! You've successfully authenticated, but GitHub does not provide shell access.

接下来就可以上传你的代码了。

第三步:在GitHub新建自己的Repository,并关联到本地

一、登录GitHub账号,新建Repository

  • 点击Create repository 进入下面界面

二、关联本地文件

打开终端(terminal),cd到所传文件夹中,然后执行

git init   //初始化本地仓库
git remote add origin git@github.com:xxxxxx/CCTestDemo.git  //连接远程仓库并建了一个名叫:origin的别名,当然可以为其他名字,
git pull origin master  //先从远程pull一次文件  以免提交报错
git add -A   //文件  (git add -A 为添加该文件夹所有文件)
git commit -m "你的注释"  //提交到本地仓库,并写一些注释
git push origin master   //将本地仓库合并到别名为origin地址的master分支

如果想把本地的 dev_flmeng 分支推送到 远程的 dev_flmeng分支,可以用
git push origin dev_flmeng:dev_flmeng
因为本地 和 远程分支名称一致,可以简写为
git push origin dev_flmeng

如果中间不出什么问题就大功告成了!!! 刷新GitHub页面就可以看到了。
注:

  1. 如果git remote add origin这一步出现origin exitss, 输入git remote rm origin,再次执行上面那条语句。

  2. 如果出现 failed to push some refs to git错误,可以通过如下命令进行代码合并 git pull --rebase origin master

  3. 切记上传文件时,一定要先commit到本地仓库,才能进行push提交,否则会显示Everything up-to-date(意思就是目前的远程仓库的内容跟本地仓库对比后,没有做修改,是最新的。

  4. 要关联一个远程库,使用命令git remote add origin git@server-name:path/repo-name.git 关联后,使用命令git push -u origin master 第一次推送master分支的所有内容;

此后,每次本地提交后,只要有必要,就可以使用命令git push origin master推送最新修改。

Reference

Git 拉去Github某个分支

方法一:直接获取

  • 首先新建个文件夹,右键打开Git Bash

  • Git Bash中直接输入指令:git clone -b dev 代码仓库地址dev是分支名称)
  • 拉取完毕

方法二:先关联远程仓库

  • 打开Git Bash
  • Git Bash 中输入 git init进行初始化
  • 与远程代码仓库建立连接:git remote add origin 代码仓库地址 –关联远程仓库

  • 将远程分支拉到本地:git fetch origin devdev即分支名)

  • 创建本地分支:git checkout -b LocalDev origin/dev (LocalDev 为本地分支名,dev为远程分支名)

  • 根据分支的变化,感觉这条指令可能是创建并切换到该分支
  • 最后一步将远程分支拉取到本地:git pull origin devdev为远程分支名)

方法三

  • 打开Git Bash

  • 输入 git clone 代码仓库地址

  • 进入文件夹中 命令:cd XXX(文件夹名)

  • 继续输入指令 git submodule init

  • 最后 git submodule update

  • 至此结束

Reference

Git版本控制__分支管理相关推荐

  1. git版本控制以及分支管理

    git版本控制以及分支管理--一起乘坐时光机 四.深度剖析 一.版本控制---时光机穿梭 1.熟悉版本 2.版本回退 3.管理修改 1.管理修改以及理解工作的原理 2.撤销修改的内容 3.删除文件 二 ...

  2. Git 远程仓库分支管理

    目录 目录 速查表 关联远程代码仓库 克隆远程仓库 分支管理 创建分支 切换分支 合并分支 删除分支 解决冲突 速查表 指令 作用 git branch 查看分支 git branch newBran ...

  3. Django实战技巧(2)-git代码仓分支管理技巧

    Django(1)-简介 Django(2)-创建项目及默认项目目录结构介绍 Django(3)-配置文件详解 Django(4)-URL和视图 Django(5)-路由配置实例 Django(6)- ...

  4. Git本地库版本控制和分支管理

    版本控制 ①git log [parameter] 查看版本记录(使用Hash值指向相关信息,只显示之前的版本) 常用参数: –pretty = oneline (或 --oneline,缩短Hash ...

  5. Git配置、版本控制与分支管理

    文章目录 一.创建版本库 1. 配置git环境 二.时光机穿梭 1. 版本回退 2. 撤销修改 3. 删除文件 三.分支管理 1. 创建与合并分支 2. 解决冲突 3. Bug分支 4. 多人协作 参 ...

  6. Git由浅入深之分支管理

    几乎所有的版本控制系统都以分支的方式进行操作,分支是独立于项目主线的一条支线,我们可以在不影响主线代码的情况下,在分支下进行工作.对于传统的一些版本控制工具来说,我们通常需要花费比较多的时间拷贝主线代 ...

  7. Git远程和分支管理

    一.远程 Git是分布式版本控制系统,最重要的优点就是远程仓库托管代码.不用自己搭建一个服务器,在github上面注册一个账户就可免费获取远程仓库. 首先需要先在github上面创建仓库.创建步骤百度 ...

  8. Git怎样做分支管理

    查看全文 http://www.taodudu.cc/news/show-3787419.html 相关文章: git分支规范 实际项目中如何使用Git做分支管理 多人开发 Git 分支管理详解 gi ...

  9. (GIT)代码分支管理策略

    一.我们采用的管理策略(分支开发主干发布) 1. 主分支(master),用于发布,每次发布时打一个(tag),不做任何开发使用 拉取源:无 合并目标:无 修改:不允许 生命周期:持续 2. 开发分支 ...

最新文章

  1. python3 aes 报错 ValueError: Incorrect AES key length (95 bytes)的解决方案
  2. jquery clone 与 clone(true) 的区别
  3. Ajax — 评论列表
  4. Flask爱家租房--发布新房源(总结)
  5. WuJiuVideoX视频小说图片站群程序开源源码
  6. 打开c盘_为什么你的C盘总是爆满?教你彻底清理C盘空间,瞬间提速50%
  7. 蓝牙:协议/服务复用(PSM)
  8. PyQt5-网格布局(QGridLayout)-10
  9. 关于在VC + + 2008 VCRedist安装时生成在根目录下的临时文件
  10. 工作流:一文让你学会使用flowable工作流
  11. 144项大神级ppt制作技术
  12. web前端程序员真的值这么多钱吗?
  13. [渝粤教育] 四川大学 土木工程概论 参考 资料
  14. 【股票】股票交易的手续费介绍以及计算
  15. Pandas 的使用
  16. 程序员下班为什么不关电脑?
  17. 使用代理爬去微信公众号_微信公众号怎么去推广运营?企业微信公众号要如何运营?微信公众号运营技巧,你get了吗?微信怎么去推广运营?...
  18. 小杜机器人线下店_小度首家官方体验店开业啦!线下体验小度系列产品 智能家居任你玩...
  19. Stata:无条件分位数回归及应用
  20. java浏览器无界面后台截屏工具

热门文章

  1. 博士申请 | 纽约州立大学布法罗分校邹韶峰老师招收强化学习方向全奖博士生...
  2. 汽车线控转向系统的全球与中国市场2022-2028年:技术、参与者、趋势、市场规模及占有率研究报告
  3. Vue + Spring Boot 项目实战(二十二):生产环境初步搭建
  4. 程序猿生存指南-56 前路漫漫
  5. seek是python文件操作方法吗,seek引发的python文件读写的问题
  6. RIKIBOT-FX4多线激光雷达与LIO-SAM算法构建三维地图
  7. CSDN 博客 修改文章搜索为 bing 搜索,且只搜索自己的博客的方法
  8. unity ugui改变width,height,pos
  9. Spyder crashed during last session 及其后诸多问题
  10. css制作逐帧动画-案例