TortoiseGit 与 Git 扩展

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6011893/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 10:56:08  来源:igfitidea点击:

TortoiseGit vs Git Extensions

gittortoisegitgit-extensions

提问by Shawn Mclean

What are the benefits and disadvantage of using either Git Extensions or TortoiseGit on a Windows Based OS?

在基于 Windows 的操作系统上使用 Git 扩展或 TortoiseGit 有什么优点和缺点?

回答by Rafael Ibraim

I don't know GitExtensions, but I can share my experience with TortoiseGit (alluded to by marc_s's comment):

我不知道 GitExtensions,但我可以与 TortoiseGit 分享我的经验(由 marc_s 的评论暗示):

Pros:

优点:

  • Excellent integration with Windows (it's a shell extension)
  • Nearly the same UI as TortoiseSVN (if you already used TortoiseSVN, you know what to expect).
  • 与 Windows 的完美集成(它是一个 shell 扩展)
  • 几乎与 TortoiseSVN 相同的用户界面(如果您已经使用过 TortoiseSVN,您就知道会发生什么)。

Cons:

缺点:

  • You will have a hardtime understanding how to use git.
  • 您将很难理解如何使用 git。

The problem with TortoiseGit is that people who worked with TortoiseSVN will thinkeverything will (or should) work exactly like in SVN... and end up never really understanding how to work with git. As a personal experience, the company I work migrated from SVN to git after 2 years, and every single developer that used TortoiseGit ended up not really knowing what they are doing and sometimes screwing up their local repositories. In the end, they dropped TortoiseGit and spend time learning git "the hard way" (shell, msysGit on Windows) and everyone has been happy since then.

TortoiseGit 的问题在于,使用 TortoiseSVN 的人会认为一切都将(或应该)像在 SVN 中一样工作......最终永远不会真正了解如何使用 git。作为个人经验,我工作的公司在 2 年后从 SVN 迁移到 git,每个使用 TortoiseGit 的开发人员最终都不知道他们在做什么,有时甚至搞砸了他们的本地存储库。最后,他们放弃了 TortoiseGit 并花时间“艰难地”学习 git(shell,Windows 上的 msysGit),从那时起每个人都很开心。

Conclusion: Just use msysGit directly and properly learn git. You will avoid many headaches in the future.

结论:直接使用msysGit,正确学习git。将来您将避免许多头痛。

回答by klaus thorn

My company tried both and quickly dropped Tortoise Git. It crashed much more often. The coders claim that Tortoise Git is not capable enough but I did not check that myself. But I did see lots of The crashes myself.

我的公司尝试了这两种方法,很快就放弃了 Tortoise Git。它坠毁的频率更高。编码人员声称 Tortoise Git 的能力不够,但我自己没有检查。但我自己确实看到了很多崩溃。

The Coders prefer git bash, the others use but hate git Extensions. Although even some of them additionally open up git bash. Git bash is unavoidable to see the progress counters.

Coders 更喜欢 git bash,其他人使用但讨厌 git Extensions。尽管其中一些甚至还打开了 git bash。Git bash 不可避免地会看到进度计数器。

Git Extensions has no option to show progress counters during a pull. So with Git Extensions only, you sit in front of an enigmatic non-progress bar, not knowing what happens and whether something failed. The worst is a missing or incorrect password: Git Extensions just lets you wait forever, showing the same glowing bar as if it was doing something time-consuming. Another horror of Git Extensions is the frequent abort with "out of memory", when versioning many big files and pulling with rebase. After such an abort, non-coding users are always overwhelmed with problems. Many files that they did not change show up as changed and the lock file prevents them from dealing with the problem, etc..

Git Extensions 无法在拉取期间显示进度计数器。因此,仅使用 Git 扩展,您就会坐在一个神秘的非进度条前,不知道会发生什么以及是否出现故障。最糟糕的是密码丢失或不正确:Git Extensions 只是让你永远等待,显示相同的发光条,好像它正在做一些耗时的事情。Git 扩展的另一个可怕之处是频繁中止“内存不足”,当版本化许多大文件并使用 rebase 拉动时。在这样的中止之后,非编码用户总是被问题淹没。他们没有更改的许多文件显示为已更改,并且锁定文件阻止他们处理问题等。

In my opinion both GUI tools are immature.

在我看来,这两个 GUI 工具都不成熟。

回答by studgeek

You want Git Extensions for one important reason - it shows you the graphical view of the commit log (see below). Without that graphical view I don't think most folks new to git will ever get what is going on with branches, commits, rebasing, cherry picking, etc (I know I didn't).

您需要 Git 扩展有一个重要原因——它向您显示提交日志的图形视图(见下文)。如果没有那个图形视图,我认为大多数 git 新手都不会了解分支、提交、变基、樱桃采摘等发生了什么(我知道我没有)。

You are going to do want to do some of your work on the command line also, it's your best bet to practically use git since all the help you get will be command line based.

您也确实希望在命令行上完成一些工作,最好实际使用 git,因为您获得的所有帮助都将基于命令行。

All that said, you can use Tortoise Git also (assuming it works) since they all call the same command line executables and act on the same git repository.

综上所述,您也可以使用 Tortoise Git(假设它可以工作),因为它们都调用相同的命令行可执行文件并作用于相同的 git 存储库。

Most IDEs have git support also, JetBrains IDEA does a great job of adding change lists and other functionality on top of it.

大多数 IDE 也有 git 支持,JetBrains IDEA 在添加更改列表和其他功能方面做得很好。

Git Extensions log view

Git 扩展日志视图

回答by Phileo

I don't have much experience with TortoiseGit, but I installed, and am currently using GitExtensions v2.21.

我对 TortoiseGit 没有太多经验,但我安装了,目前正在使用 GitExtensions v2.21。

The biggest advantages with using GitExtensions:

使用 GitExtensions 的最大优势:

  • visual gitk-like graphical display of codelines and branches, with all essential info available in tabs, eliminating any need to work with the unfriendly SHA's.
  • ability to install as Administrator and all other users on the same PC can use it just like any regular user.
  • built-in shell integration with Windows Explorer
  • out of the box integration with Visual Studio (Windows Eclipse users only need msysgit, as they have their own GUI to replace the need for GitExtensions)
  • easy to use installer that comes pre-packaged with all necessary and pre-requisite functionality to start out of the box (SSH Client, KDiff, msysgit).
  • integration with GitHub (Fork,clone, pull are all streamlined)
  • 代码行和分支的可视化 gitk 式图形显示,所有基本信息都在选项卡中可用,无需使用不友好的 SHA。
  • 能够以管理员身份安装,并且同一台 PC 上的所有其他用户可以像任何普通用户一样使用它。
  • 与 Windows 资源管理器的内置 shell 集成
  • 与 Visual Studio 开箱即用的集成(Windows Eclipse 用户只需要 msysgit,因为他们有自己的 GUI 来取代对 GitExtensions 的需求)
  • 易于使用的安装程序,它预先打包了所有必要和先决条件,可以开箱即用(SSH 客户端、KDiff、msysgit)。
  • 与 GitHub 集成(Fork、clone、pull 都精简了)

Disadvantages:

缺点:

  • documentation does not keep up with the new features constantly being added. For example, I still don't know how to use the scripting features.
  • 文档跟不上不断添加的新功能。例如,我仍然不知道如何使用脚本功能。

Lest we forget that it is a completely free program, and offered to us as an option with no strings attached, I don't see the rationale for such high expectations placed upon it, as if we were paid clients? I have seen some of the aborts and freezing that the previous user mentioned, but I believe the majority of that has been fixed in v2.24. Alot of the aborts and failed actions are really not the fault of GitExtensions, but more a symptom of a systemic problem outside of GitExtensions (eg. misconfigured SSH setup, file permissions issues on the server hosting the remote repo, etc). For example, there was one time when I did a simple push which caused fail and abort. It turns out that the remote I was trying to push to was on a very long pathname which was causing problems for the Mac server that hosted the repo.

以免我们忘记它是一个完全免费的程序,并且作为一个没有附加条件的选项提供给我们,我看不出对它寄予如此高期望的理由,就好像我们是付费客户一样?我已经看到前一个用户提到的一些中止和冻结,但我相信其中大部分已在 v2.24 中修复。许多中止和失败的操作实际上不是 GitExtensions 的错,而是 GitExtensions 之外的系统性问题的症状(例如,SSH 设置错误、托管远程存储库的服务器上的文件权限问题等)。例如,有一次我做了一个简单的推送,导致失败和中止。事实证明,我试图推送到的远程路径名很长,这导致托管 repo 的 Mac 服务器出现问题。

Anyways, that said however, my experience with GitExtensions has been fairly positive. I find the benefits outlined above have made it worthwhile to put up with the occasional aborts and freezes until the bugs are fixed.

无论如何,尽管如此,我对 GitExtensions 的体验还是相当积极的。我发现上面概述的好处使得忍受偶尔的中止和冻结直到错误得到修复是值得的。

回答by Dave March

I can't speak to Git Extensions as I've never used it. Had some problems with pure GIT. Couldn't integrate GVIM, for instance. Tortoise Git has an integrated editor and diff tool (which is amazing), so that's a very nice convenience. I loved the branch diagrams in the Scott Chacon book and was hoping TGit would have a similar diagram. They do have a tool for showing branches but it's not as nice as the one in the book.

我无法使用 Git 扩展,因为我从未使用过它。纯 GIT 有一些问题。例如,无法集成 GVIM。Tortoise Git 有一个集成的编辑器和 diff 工具(非常棒),所以非常方便。我喜欢 Scott Chacon 书中的分支图,并希望 TGit 有类似的图。他们确实有一个显示分支的工具,但不如书中的好。

One thing to bear in mind is that since TGit is just a shell on top of GIT, there's no harm in mixing the two methods. I use TGit for most everything, but dip into GIT for commands that are awkward or that I simply don't understand well in TGit. But even if you plan to use TGit, it's still important, as mentioned above, to understand the basics of GIT first. I'd read through the first, say, three chapters in the Chacon book (available for free online at http://progit.org/book/or by purchase at Amazon). If you're like me you may want to read them several times over to let the paradigm sink in. It's not all that complicated, but it is very different from previous VCS's.

要记住的一件事是,由于 TGit 只是 GIT 之上的一个外壳,因此混合这两种方法没有坏处。我在大多数情况下都使用 TGit,但对于笨拙的命令或我在 TGit 中根本不了解的命令,我会使用 GIT。但即使您打算使用 TGit,如上所述,首先了解 GIT 的基础知识仍然很重要。我通读了 Chacon 书中的前三章(可从http://progit.org/book/在线免费获得,或在亚马逊上购买)。如果你像我一样,你可能想多读几遍,让范式深入其中。它并不那么复杂,但它与以前的 VCS 有很大不同。

TGit never crashed on me, as it has for some of the other reviewers, but then my repo's have been small. It did eat my commit comments on more than one occasion, which could have been user error. Since you can go back and re-edit comments this was just an annoyance and worth the convenience of having a GUI, with windows that show a great deal of info at a glance.

TGit 从来没有像其他一些评论者那样对我造成影响,但是我的 repo 一直很小。它确实不止一次吃掉了我的提交评论,这可能是用户错误。由于您可以返回并重新编辑评论,这只是一个烦恼,值得拥有 GUI 的便利,其窗口可以一目了然地显示大量信息。

回答by prusswan

Just to counter some of remarks above:

只是为了反驳上面的一些评论:

With the correct expectation, TortoiseGit provides an excellent gui for working with git on Windows. It is not a replacement for TortoiseSvn, but an improved gui over what one can achieve using gitk + git-gui (which can be considered part of core git functionality and accessible in msysgit). The only bad thing I see is how you would not need to remember all the exact commands for checkout/rebase/merge etc, since it is possible to do all that very conveniently through the gui (which is the whole point). The putty/ssh problems have more to do with the inferior support for ssh on Windows, and are not unique to TortoiseGit.

在正确的期望下,TortoiseGit 为在 Windows 上使用 git 提供了出色的 gui。它不是 TortoiseSvn 的替代品,而是对使用 gitk + git-gui(可以被认为是核心 git 功能的一部分并且可以在 msysgit 中访问)可以实现的功能的改进的 gui。我看到的唯一不好的事情是您不需要记住所有用于结帐/变基/合并等的确切命令,因为可以通过 gui 非常方便地完成所有这些操作(这是重点)。putty/ssh 问题更多地与 Windows 上对 ssh 的支持较差有关,并且不是 TortoiseGit 独有的。

回答by Simon Tewsi

I use GitExtensions. I haven't used TortoiseGit but one of our other developers loves it and refuses to use GitExtensions. His reasoning is 1) It's familiar; 2) It has great Windows Explorer integration.

我使用 GitExtensions。我没有使用 TortoiseGit,但我们的其他开发人员之一喜欢它并拒绝使用 GitExtensions。他的理由是:1)很熟悉;2) 它有很好的 Windows 资源管理器集成。

Using GitExtensions I tend to use the Windows Explorer integration for three things only:

使用 GitExtensions 我倾向于仅将 Windows Explorer 集成用于三件事:

1) To create a new local repository (context menu item Git Init Here, which is actually a Git for Windows command; GitExtensions sits on top of Git for Windows);

1) 创建一个新的本地存储库(上下文菜单项 Git Init Here,实际上是一个 Git for Windows 命令;GitExtensions 位于 Git for Windows 之上);

2) To open the Git Extensions GUI (the browse window);

2) 打开 Git Extensions GUI(浏览窗口);

3) To clone a remote repository down to a local repository (context menu item Git Extensions > Clone).

3) 将远程存储库克隆到本地存储库(上下文菜单项 Git 扩展 > 克隆)。

For pretty much everything else I just have the GitExtensions GUI up and work from there.

对于几乎所有其他事情,我只是安装了 GitExtensions GUI 并从那里开始工作。

The developers of GitExtensions claim that almost any command can be executed from the GUI. This is not quite true but I find I only need to drop into the command line interface about once or twice a month for complex tasks.

GitExtensions 的开发人员声称几乎可以从 GUI 执行任何命令。这并不完全正确,但我发现我只需要每月大约一次或两次进入命令行界面来处理复杂的任务。

In some cases the GUI makes complex tasks simple by hiding the complexity of the underlying Git commands. This sometimes involves combining several Git commands into a single action. eg Creating submodules where the GUI combines adding a submodule, initializing it and updating it into a single action. In another case, the GUI simplifies a task by providing a command which Git lacks - removing a submodule (in Git you have to manually edit the various files such as .gitmodules and .git/config to remove a submodule). I'd be interested to know if TortoiseGit simplifies complex tasks in a similar way.

在某些情况下,GUI 通过隐藏底层 Git 命令的复杂性使复杂的任务变得简单。这有时涉及将多个 Git 命令组合到一个操作中。例如,创建子模块,其中 GUI 结合添加子模块、初始化它并将其更新为单个操作。在另一种情况下,GUI 通过提供 Git 缺少的命令来简化任务 - 删除子模块(在 Git 中,您必须手动编辑各种文件,例如 .gitmodules 和 .git/config 以删除子模块)。我很想知道 TortoiseGit 是否以类似的方式简化了复杂的任务。

GitExtensions also has fairly basic Visual Studio integration. Don't know if TortoiseGit does. There is a separate Git Source Control Provider for Visual Studio 2008 and 2010 which provides much more extensive Visual Studio integration. However, having installed the Git Source Control Provider I find I never use it. The only GitExtensions integration I use from Visual Studio is on the toolbar, to open the GitExtensions GUI with the appropriate repository. I'll work with Visual Studio on one monitor and GitExtensions open in the other.

GitExtensions 也有相当基本的 Visual Studio 集成。不知道 TortoiseGit 是否有。Visual Studio 2008 和 2010 有一个单独的 Git 源代码控制提供程序,它提供了更广泛的 Visual Studio 集成。但是,安装了 Git 源代码控制提供程序后,我发现我从未使用过它。我在 Visual Studio 中使用的唯一 GitExtensions 集成是在工具栏上,以使用适当的存储库打开 GitExtensions GUI。我将在一台显示器上使用 Visual Studio,在另一台显示器上打开 GitExtensions。

From at least version 2.32 GitExtensions shows the number of uncommitted files in its toolbar. I previously used 2.24 which didn't have this feature and it's very handy. Gives instant feedback on whether there are any uncommitted changes or not.

至少从 2.32 版开始,GitExtensions 会在其工具栏中显示未提交文件的数量。我之前用过没有这个功能的2.24,非常好用。提供关于是否有任何未提交的更改的即时反馈。

回答by linquize

For fast and easy compilation, customization, and building extensions, GitExtensions is better (C#) than TortoiseGit (Visual C++ MFC)

为了快速轻松地编译、自定义和构建扩展,GitExtensions (C#) 比 TortoiseGit (Visual C++ MFC) 更好

For portability, GitExtensions is better (.NET on Windows / mono on Linux/Mac) than TortoiseGit (Win32/64 only)

对于可移植性,GitExtensions 比 TortoiseGit(仅限 Win32/64)更好(Windows 上的 .NET / Linux/Mac 上的 mono)

To use icon overlay in Explorer, use TortoiseGit

要在资源管理器中使用图标覆盖,请使用 TortoiseGit

For performance of some features, TortoiseGit is better because it calls static / dynamic library to retrieve the result from the repository, while GitExtensions only invokes git.exe command line which has larger overhead.

对于某些功能的性能,TortoiseGit 更好,因为它调用静态/动态库从存储库中检索结果,而 GitExtensions 只调用 git.exe 命令行,开销较大。

To migrate from TortoiseSVN, TortoiseGit will be more familiar with than GitExtensions

从 TortoiseSVN 迁移过来,TortoiseGit 会比 GitExtensions 更熟悉

回答by user327312

DATE: 2011-08-27.

日期:2011-08-27。

At this point, Tortoise Git DOES NOT WORK at all, and the issue on the google code site has not received attention in a month: http://groups.google.com/group/tortoisegit-users/browse_thread/thread/9090337b7936e1e1.

至此,Tortoise Git DOES NOT WORK, google code 站点上的问题已经有一个月没有得到关注了:http: //groups.google.com/group/tortoisegit-users/browse_thread/thread/9090337b7936e1e1

The box 'Load Putty Key' from the popup on Tortoise Git's first usage to clone a site (and start developing) is grayed out. So no private key is found, and the error message is 'connection dropped' SUCCESSFUL!!!!

Tortoise Git 首次用于克隆站点(并开始开发)的弹出窗口中的“加载 Putty 密钥”框是灰色的。所以没有找到私钥,错误信息是“连接断开”成功!!!!

Git Bash works perfectly, albeit console based. And if everyone above talks about not understanding the Git concept when using Tortoise Git, I'd just stay away from it based on that, even not taking into account the last 3 hours I spent trying to get Tortoise Git working for a developer. He's going to have to learn console Git, or go down the road.

Git Bash 完美运行,尽管是基于控制台的。如果上面的每个人都谈到在使用 Tortoise Git 时不理解 Git 概念,我会基于此远离它,甚至不考虑我过去 3 个小时试图让 Tortoise Git 为开发人员工作的时间。他将不得不学习控制台 Git,或者继续学习。

I got it working in 15 minutes, and I'm just a hacker trying to hire programmers ;-)

我在 15 分钟内就搞定了,而我只是一个试图雇佣程序员的黑客 ;-)

PS, Eclipse has all three major Version Control repository 'connectors' available and is a very good editor.

PS,Eclipse 拥有所有三个主要的版本控制存储库“连接器”,并且是一个非常好的编辑器。