worktools-git 工具的使用总结(6)

1.撤消修改

1)revert:反转提交,它就是把你的一个提交先撤消掉,但是,它跟reset不同的是,你的这次这小会留下记录,这样在你下次需要的时候,可以通过这个节点把撤消的提交恢复

[email protected]7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git pull
Already up-to-date.
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ vim 1.txt
[email protected]zhangshuli-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git add .
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git commit -m "test 1"
[work 4f3ab02] test 1
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 1.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ vim 2.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git add .
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git commit -m "test 2"
[work c7bc7ce] test 2
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 2.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log -2
commit c7bc7ced616685852b0b225042f34c038979ade4
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:14:31 2015 +0000

    test 2

    Change-Id: I68bbc606ae343b33f53747745db9f2a5ccf1bc82

commit 4f3ab0254090a54a2307b14d620f83a744d879b0
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:14:04 2015 +0000

    test 1

    Change-Id: I233ee74674f6e3f054c5abe0622e85efcc83b563
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git revert 4f3ab0254090a54a2307b14d620f83a744d879b0
Finished one revert.
[work ab43af6] Revert "test 1"
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 1.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log -3
commit ab43af6847f07d08a6c14cb211ce4007782202f5
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:14:50 2015 +0000

    Revert "test 1"

    This reverts commit 4f3ab0254090a54a2307b14d620f83a744d879b0.

commit c7bc7ced616685852b0b225042f34c038979ade4
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:14:31 2015 +0000

    test 2

    Change-Id: I68bbc606ae343b33f53747745db9f2a5ccf1bc82

commit 4f3ab0254090a54a2307b14d620f83a744d879b0
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:14:04 2015 +0000

    test 1

    Change-Id: I233ee74674f6e3f054c5abe0622e85efcc83b563
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ ls
2.txt  AndroidManifest.xml  Android.mk  apptests  CleanSpec.mk  ext  MODULE_LICENSE_APACHE2  NOTICE  proguard.flags  res  src
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ vim 3.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git add .
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git commit -m "test 3"
[work f4c241d] test 3
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 3.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log -5
commit f4c241ddb521ad85605687734addaac3887c4a4e
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:15:54 2015 +0000

    test 3

    Change-Id: I0bfde2e50381d2dc1b2717c0d2d839278f1c5fc6

commit ab43af6847f07d08a6c14cb211ce4007782202f5
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:14:50 2015 +0000

    Revert "test 1"

    This reverts commit 4f3ab0254090a54a2307b14d620f83a744d879b0.

commit c7bc7ced616685852b0b225042f34c038979ade4
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:14:31 2015 +0000

    test 2

    Change-Id: I68bbc606ae343b33f53747745db9f2a5ccf1bc82

commit 4f3ab0254090a54a2307b14d620f83a744d879b0
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:14:04 2015 +0000

    test 1

    Change-Id: I233ee74674f6e3f054c5abe0622e85efcc83b563

commit 7cbfacb7c742ef3afbcb50e56820def5d5d2af6f
Author: wangjianhua <[email protected]>
Date:   Tue Feb 10 18:36:49 2015 +0800

    modify hd action mode image of Mms

    Change-Id: I1856c0554d1a8824c45e547df194b4f9865f2473
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ ls
2.txt  3.txt  AndroidManifest.xml  Android.mk  apptests  CleanSpec.mk  ext  MODULE_LICENSE_APACHE2  NOTICE  proguard.flags  res  src
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git revert ab43af6847f07d08a6c14cb211ce4007782202f5
Finished one revert.
[work 153148e] Revert "Revert "test 1""
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 1.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ ls
1.txt  2.txt  3.txt  AndroidManifest.xml  Android.mk  apptests  CleanSpec.mk  ext  MODULE_LICENSE_APACHE2  NOTICE  proguard.flags  res  src
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ 

如果你想把多次的提交转化为一次反转,可以添加参数-n

[email protected]7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git revert -n c7bc7ced616685852b0b225042f34c038979ade4
Finished one revert.
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git st
# On branch work
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#    deleted:    2.txt
#
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git revert -n f4c241ddb521ad85605687734addaac3887c4a4e
Finished one revert.
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git st
# On branch work
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#    deleted:    2.txt
#    deleted:    3.txt
#
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git commit -m "revert test1 and test2"
[work 69b0c2e] revert test1 and test2
 2 files changed, 0 insertions(+), 2 deletions(-)
 delete mode 100644 2.txt
 delete mode 100644 3.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log -1
commit 69b0c2e45258fcf33203f25444d562a9470092d7
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:19:43 2015 +0000

    revert test1 and test2

    Change-Id: I6563031fe059a2c5bdf3e6bfa5278849ee0e9964
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ ls
1.txt  AndroidManifest.xml  Android.mk  apptests  CleanSpec.mk  ext  MODULE_LICENSE_APACHE2  NOTICE  proguard.flags  res  src
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git revert 69b0c2e45258fcf33203f25444d562a9470092d7
Finished one revert.
[work bbe5a74] Revert "revert test1 and test2"
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 2.txt
 create mode 100644 3.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ ls
1.txt  2.txt  3.txt  AndroidManifest.xml  Android.mk  apptests  CleanSpec.mk  ext  MODULE_LICENSE_APACHE2  NOTICE  proguard.flags  res  src
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ vim 2.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$

对于一次记录只能进行一次revert,多次连续执行是没有意义的,因为revert一次以后,这次提交的内容已经不存了

[email protected]7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ vim 4.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git add .
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git commit -m "test4"
[work 2bc646d] test4
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 4.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log -1
commit 2bc646d2f078f3c03ab5352a13a057fccc83621d
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:21:50 2015 +0000

    test4

    Change-Id: Ia7dff511d77e566a3920aa4fe29331afd80ed215
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git revert 2bc646d2f078f3c03ab5352a13a057fccc83621d
Finished one revert.
[work 85ceb81] Revert "test4"
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 4.txt
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ ls
1.txt  2.txt  3.txt  AndroidManifest.xml  Android.mk  apptests  CleanSpec.mk  ext  MODULE_LICENSE_APACHE2  NOTICE  proguard.flags  res  src
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git revert 2bc646d2f078f3c03ab5352a13a057fccc83621d
Finished one revert.
# On branch work
nothing to commit (working directory clean)

2)历史记录重排序

[email protected]7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log --pretty=oneline -5
c8edf2bebf0bea0906a09d277ad0f1007a791e36 test5
35a249e2cc2acf11a078e28381aee80f602aa64a Revert "test4"
2bc646d2f078f3c03ab5352a13a057fccc83621d test4
bbe5a74e8e0fa135577b1e5dd9554d9e49c90caf Revert "revert test1 and test2"
69b0c2e45258fcf33203f25444d562a9470092d7 revert test1 and test2
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git rebase -i 69b0c2e45258fcf33203f25444d562a9470092d7
Successfully rebased and updated refs/heads/work.
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log --pretty=oneline -5
a3dfb66a35509f72ed9606a3614ed0b660c082d0 Revert "revert test1 and test2"
3b850bebefe0b6005845d534875e2d198a879af9 test5
47e439085f53260c1e0d88a6c17370d0a8437aa6 Revert "test4"
bcf6a96ef4dba4ee819ce357864911aa60458ae7 test4
69b0c2e45258fcf33203f25444d562a9470092d7 revert test1 and test2
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$

执行了git rebase -i 69b0c2e45258fcf33203f25444d562a9470092d7  命令以后,你会发现如下界面

  1 pick bcf6a96 test4
  2 pick 47e4390 Revert "test4"
  3 pick 3b850be test5
  4 pick a3dfb66 Revert "revert test1 and test2"
  5
  6 # Rebase 69b0c2e..a3dfb66 onto 69b0c2e
  7 #
  8 # Commands:
  9 #  p, pick = use commit
 10 #  r, reword = use commit, but edit the commit message
 11 #  e, edit = use commit, but stop for amending
 12 #  s, squash = use commit, but meld into previous commit
 13 #  f, fixup = like "squash", but discard this commit‘s log message
 14 #
 15 # If you remove a line here THAT COMMIT WILL BE LOST.
 16 # However, if you remove everything, the rebase will be aborted.
 17 #

你更改pick的顺序,就决定了历史记录的顺序

3)多个提交压合一个

[email protected]:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log --pretty=oneline -3
f10a4b93c8bbc834b644295ea2341cd6690bf954 test5
954ba575dc29decdb4642d83421dcf3c7cfe2192 Revert "test4"
bcf6a96ef4dba4ee819ce357864911aa60458ae7 test4
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git rebase -i bcf6a96ef4dba4ee819ce357864911aa60458ae7
[detached HEAD 20ac46d] Revert "test4"
 4 files changed, 3 insertions(+), 1 deletions(-)
 create mode 100644 2.txt
 create mode 100644 3.txt
 delete mode 100644 4.txt
 create mode 100644 branch.txt
Successfully rebased and updated refs/heads/work.
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log --pretty=oneline -3
20ac46dd92113d8c40b33cb91402f6025551bef2 Revert "test4"
bcf6a96ef4dba4ee819ce357864911aa60458ae7 test4
69b0c2e45258fcf33203f25444d562a9470092d7 revert test1 and test2
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log --stat 20ac46dd92113d8c40b33cb91402f6025551bef2
commit 20ac46dd92113d8c40b33cb91402f6025551bef2
Author: zhangshuli <[email protected]>
Date:   Mon Mar 2 16:22:06 2015 +0000

    Revert "test4"

    This reverts commit 2bc646d2f078f3c03ab5352a13a057fccc83621d.

    Revert "revert test1 and test2"

    This reverts commit 69b0c2e45258fcf33203f25444d562a9470092d7.

    test5

    Change-Id: I09af8b31eb2d07cba0949042e06e09b85d597b7d

 2.txt      |    1 +
 3.txt      |    1 +
 4.txt      |    1 -
 branch.txt |    1 +
 4 files changed, 3 insertions(+), 1 deletions(-)

这个其实就是在修改历史记录的基础上进行了第二次修改,如下

  1 pick f4c241d test 3
  2 pick 99298bc revert test1 and test2
  3 pick 3e92336 test4
  4 pick dd6f1ea Revert "test4"
  5
  6 # Rebase ab43af6..dd6f1ea onto ab43af6
  7 #
  8 # Commands:
  9 #  p, pick = use commit
 10 #  r, reword = use commit, but edit the commit message
 11 #  e, edit = use commit, but stop for amending
 12 #  s, squash = use commit, but meld into previous commit
 13 #  f, fixup = like "squash", but discard this commit‘s log message
 14 #
 15 # If you remove a line here THAT COMMIT WILL BE LOST.
 16 # However, if you remove everything, the rebase will be aborted.
 17 #

修改

  1 pick f4c241d test 3
  2 squash 3e92336 test4
  3 pick 99298bc revert test1 and test2
  4 pick dd6f1ea Revert "test4"
  5
  6 # Rebase ab43af6..dd6f1ea onto ab43af6
  7 #
  8 # Commands:
  9 #  p, pick = use commit
 10 #  r, reword = use commit, but edit the commit message
 11 #  e, edit = use commit, but stop for amending
 12 #  s, squash = use commit, but meld into previous commit
 13 #  f, fixup = like "squash", but discard this commit‘s log message
 14 #
 15 # If you remove a line here THAT COMMIT WILL BE LOST.
 16 # However, if you remove everything, the rebase will be aborted.
 17 #

结果

[email protected]7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log --pretty=oneline -5
dd6f1ea300a8314c76fae3854291ace572f28391 Revert "test4"
3e92336ac3044d64b17c424eba01682234b14ff4 test4
99298bc028c9f9e45cc54302a371c729c8d4dd57 revert test1 and test2
f4c241ddb521ad85605687734addaac3887c4a4e test 3
ab43af6847f07d08a6c14cb211ce4007782202f5 Revert "test 1"
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git rebase -i ab43af6847f07d08a6c14cb211ce4007782202f5
[detached HEAD c294d73] test 3
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 3.txt
 create mode 100644 4.txt
Successfully rebased and updated refs/heads/work.
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ git log --pretty=oneline -5
d69bd5c2f63bf3101816263c5325507010d6f8cc Revert "test4"
35942e8e4ef640804ada6e19bc8f62364892333a revert test1 and test2
c294d73f0d977b02686712b935572c486c478201 test 3
ab43af6847f07d08a6c14cb211ce4007782202f5 Revert "test 1"
c7bc7ced616685852b0b225042f34c038979ade4 test 2
[email protected]-MS-7817:~/PROJECT/PROJECT_V5/32_kk_qhd_k25/packages/apps/Mms$ 

4)一个提交分为多个提交

这个具体有什么作用还不清出,以后遇到了再说吧

时间: 2024-09-30 00:51:42

worktools-git 工具的使用总结(6)的相关文章

git工具的使用

Git工具的出现降低了软件版本维护的成本,极大的提高了工作效率,在这里列出了一些使用方法,方便以后查看. 1.Git的初始化->创建一个Git仓库:git init 2.创建信息:git config --global user.name-->创建用户名 git config --global user.email-->创建用户邮箱 git config --list-->查看配置信息 3.提交创建的文件:git add 文件的路径(这是具体的一个文件路径)-->添加到缓存区

Myeclipse如何使用自带git工具向远程仓库提交代码

先看一下Myeclipse自带的git工具  本人是在码云上面注册的账号,上面有项目的仓库,将仓库的项目克隆到本地之后,在myeclipse中导入该项目. 那么如何将修改后的代码再提交到码云上面? 第一步:将改动的代码标记 项目右键:team->synchronize workspace  点击确定  项目右键>add to git index  第二步:将工作空间的代码提交到本地仓库 commit  需要写出注释  第三步:将远程仓库的代码合并到本地仓库 pull 这一步可能需要解决代码冲突

日积月累Learning Linux(一):在Linux下安装Git工具

背景: 由于项目需要,经常在github上下载开源库项目源代码.因此最近决定花时间系统学习一下Linux下的相关软件的安装方法,这里就以Git工具的安装为例进行讲解. Linux(fedora18)安装Git工具: 1)Git与Github的区别: Github是一个网站,给用户提供git服务.相当于web版的Git工具,在Github上注册个账号,就可以享受网站提供的Git服务.而Git是一个版本控制系统,与SVN.CVS是类似的概念,简单点说就是对你的文件的一种版本管理(此处所谓的版本其实就

Git详解之六 Git工具(转)

Git 工具 现在,你已经学习了管理或者维护 Git 仓库,实现代码控制所需的大多数日常命令和工作流程.你已经完成了跟踪和提交文件的基本任务,并且发挥了暂存区和轻量级的特性分支及合并的威力. 接下来你将领略到一些 Git 可以实现的非常强大的功能,这些功能你可能并不会在日常操作中使用,但在某些时候你也许会需要. 6.1  修订版本(Revision)选择 Git 允许你通过几种方法来指明特定的或者一定范围内的提交.了解它们并不是必需的,但是了解一下总没坏处. 单个修订版本 显然你可以使用给出的

windows中使用Git工具连接GitHub(配置篇)

Git在源码管理领域目前占很大的比重了,而且开源的项目很多都转到GitHub上面了.例如:jQuery, reddit, Sparkle, curl, Ruby on Rails, node.js, ClickToFlash, Erlang/OTP,CakePHP, Redis. 本文详细的说明了如何在Windows下安装配置Git工具连接GitHub.并可以在Visual Studio中使用Git. 一.准备工具 1.下载Git Extensions.地址 http://code.google

【转】第 02 天:在 Windows 平台必裝的三套 Git 工具

原文网址:https://github.com/doggy8088/Learn-Git-in-30-days/blob/master/docs/02%20%E5%9C%A8%20Windows%20%E5%B9%B3%E5%8F%B0%E5%BF%85%E8%A3%9D%E7%9A%84%E4%B8%89%E5%A5%97%20Git%20%E5%B7%A5%E5%85%B7.markdown 要開始使用 Git 版本控管,首先要安裝適當的 Git 工具,這個系列的文章主要還是以 Windows

git工具的使用教程

Git 是一种版本控制工具,也叫作版本管理软件(分布式管理软件).这里介绍Git的基本使用步骤,关于 Git 更详细的介绍,读者可以参考其官方网站提供的文档. 1  安装Git 在Ubuntu系统中安装Git工具: # sudo apt-get install git 如果是第一次使用 Git,需要进行如下设置: # git config --global user.name "laoyao" # git config --global user.email "[email 

代码管理工具:使用github和git工具管理自己的代码

一.git工具和账户创建 1.1 安装 Git 是 Linus Torvalds 最近实现的源代码管理软件."Git 是一个快速.可扩展的分布式版本控制系统,它具有极为丰富的命令集,对内部系统提供了高级操作和完全访问." Git 目前主要由寻找 CVS 或专有代码管理解决方案替代物的软件开发人员所使用.Git 与 CVS 有很多区别: 分支更快.更容易. 支持离线工作:本地提交可以稍后提交到服务器上. Git 提交都是原子的,且是整个项目范围的,而不像 CVS 中一样是对每个文件的.

git工具学习

最近实习的时候,遇到git工具,发现好强大之前没用过,特来学习下,然后自己注册了一个github账号,结合git命令练习一下,git的安装就不说了. git简介: git是分布式版本控制系统,相对于集中式版本控制系统有很大的优势,集中式版本控制系统最大的毛病就是必须联网才能工作,并且,分布式版本控制系统的安全性要高很多,因为每个人电脑里都有完整的版本库,某一个人的电脑坏掉了不要紧,随便从其他人那里复制一个就可以了.而集中式版本控制系统的中央服务器要是出了问题,所有人都没法干活了. git常用命令

如何禁用/关闭vs2017自带的Git工具的?

对于用习惯了独立Git工具和命令行的人来说,看到Visual Studio自带的Git工具后,很是别扭,到处充满了不习惯,而且是不是还会出现电脑卡顿的现象(可能是我自身电脑配置一般的问题). 如何关闭vs2017自带的Git工具? 解决方案:Vs顶部菜单 - 工具 - 选项 - 源代码管理 - 插件选择 - 当前源代码插件:设置为“无”. 如何禁用Vs2017自带的Git ? 解决方案: ctrl + r 输入 regedit 打开注册表后找到:HKEY_CURRENT_USER\Softwar