TortoiseGit 真的让 Git 像 TortoiseSVN 一样更容易使用吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5645732/
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-19 05:20:42  来源:igfitidea点击:

Does TortoiseGit actually make Git a lot easier to use like TortoiseSVN?

gittortoisegit

提问by nonopolarity

With the easy experience of TortoiseSVN, I looked at some command line of SVN and it wasn't as easy to use. Does TortoiseGit actually makes Git a lot easier to use, just like TortoiseSVN did for the SVN command line?

有了TortoiseSVN的简单体验,我看了一些SVN的命令行,没那么好用。TortoiseGit 是否真的让 Git 更易于使用,就像 TortoiseSVN 对 SVN 命令行所做的那样?

回答by eckes

I think, you lose a lot of functionality of Git when you use TortoiseGit. From my point of view, TortoiseGit gives the user the feeling of usingSVN while the actual back-end is Git.

我认为,当你使用 TortoiseGit 时,你会失去很多 Git 的功能。在我看来,TortoiseGit 给用户的感觉是在使用SVN,而实际的后端是 Git。

When I was working with SVN repos, the only client I used was TortoiseSVN. No console at all.

当我使用 SVN 存储库时,我使用的唯一客户端是 TortoiseSVN。根本没有控制台。

But learning Git was quite console-driven for me, so I use the console to work with Git. There are some use cases when I fire up my TortoiseGit, for example when reading logs or resolving conflicts. But instead of Tortoise, I could also use gitkfor that. And — not to forget — TortoiseGit is not the most stable piece of software.

但是学习 Git 对我来说是由控制台驱动的,所以我使用控制台来使用 Git。当我启动 TortoiseGit 时有一些用例,例如在阅读日志或解决冲突时。但我也可以用gitk它来代替 Tortoise 。而且——不要忘记——TortoiseGit 不是最稳定的软件。

In my opinion, the only right to exist for TortoiseGit is to catch the TortoiseSVN users that are switching to Git: they can stick to their used explorer integration and don't have to learn a new tool when using a new VCS (IMHO, the learning curve of Git is steep enough, so some people might first focus on learning the basics of git before discovering the power of the console). And the point-and-click Windows guys don't have to communicate with their system through a console. That's it.

在我看来,TortoiseGit 存在的唯一权利就是抓住正在切换到 Git 的 TortoiseSVN 用户:他们可以坚持使用他们使用过的资源管理器集成,并且在使用新的 VCS 时不必学习新工具(恕我直言, Git 的学习曲线足够陡峭,因此有些人可能会先专注于学习 git 的基础知识,然后才能发现控制台的强大功能)。并且点击式 Windows 人员不必通过控制台与他们的系统进行通信。就是这样。

I share the opinion of Noufal: if you want to useGit, take the console, if you want to playwith it, take TortoiseGit.

我分享Noufal的意见:如果你想使用混帐,走台,如果你想它,采取TortoiseGit。



Edit:
I dorespect the work of the TortoiseGitproject team that eases transition from SVN to Git for users that used TortoiseSVN before. But in my opinion: to use the full power of Git, you have to start up your Git bash. You canwork with Git using TortoiseGit only, but then, you're just scratching the surface of Git.

编辑:
确实尊重TortoiseGit项目团队的工作,该团队为之前使用 TortoiseSVN 的用户简化了从​​ SVN 到 Git 的过渡。但在我看来:要使用 Git 的全部功能,您必须启动 Git bash。您可以仅使用 TortoiseGit使用 Git,但是,您只是触及了 Git 的皮毛。

By the way: the TortoiseGit project descriptionsays:

顺便说一句:TortoiseGit 项目描述说:

TortoiseGit supports you by regular tasks, such as committing, showing logs, diffing two versions, creating branches and tags, creating patches and so on [...].

TortoiseGit 通过常规任务为您提供支持,例如提交、显示日志、区分两个版本、创建分支和标签、创建补丁等 [...]。

So their own view of their project shares mine: TortoiseGit for scratching the surface but you'll need other tools (i.e. the console) to discover the whole beauty of Git.

所以他们自己对项目的看法与我的看法相同:TortoiseGit 用于触及表面,但您需要其他工具(即控制台)来发现 Git 的全部美。

回答by Matthew Strawbridge

I don't think there should be any stigma attached to using TortoiseGit in preference to the command line git. After all, if you're developing in Windows then your primary interface with the file system is through Windows Explorer.

我不认为使用 TortoiseGit 优先于命令行 git 应该有任何污名。毕竟,如果您在 Windows 中进行开发,那么您与文件系统的主要接口是通过 Windows 资源管理器。

TortoiseGit handles the most common use cases: checking out, checking in, diffs, logs, etc. If you find something you need to do that it can't handle then by all means drop back to the command line executable, but for 98% of what you need to do on a daily basis there are tools in TortoiseGit to support you.

TortoiseGit 处理最常见的用例:签出、签入、差异、日志等。在您每天需要做的事情中,TortoiseGit 中有一些工具可以为您提供支持。

In particular, consider the act of committing your latest set of changes. In TortoiseGit, my workflow is as follows. I commit the root folder and get a window listing the changed files. I can then go through these one by one, choosing which changes to commit. Some changes may have been temporary tweaks that need reverting (a simple right-click), some are local overrides that should not be in the repository, some are temporary files that can be safely deleted (again, a right-click), etc. For the rest of them, I always diff the modified files against the versions in the repository (a simple double-click). This is a useful sanity check that you know what you're committing. For example, you can remove any temporary debugging code or add back anything that was temporarily commented out. It also gives you the chance to take a step back and consider the quality of your changes; for example, if you've added a new method but forgotten to add documentation comments you can do it at this stage.

尤其要考虑提交最新的一组更改的行为。在 TortoiseGit 中,我的工作流程如下。我提交根文件夹并获得一个列出更改文件的窗口。然后我可以一一检查这些,选择要提交的更改。一些更改可能是需要恢复的临时调整(简单的右键单击),一些是不应该在存储库中的本地覆盖,一些是可以安全删除的临时文件(再次,右键单击)等。对于其余的,我总是将修改后的文件与存储库中的版本进行比较(简单的双击)。这是一个有用的健全性检查,您知道自己在提交什么。例如,您可以删除任何临时调试代码或重新添加任何临时注释掉的代码。它还让您有机会退后一步,考虑更改的质量;例如,如果您添加了一个新方法但忘记添加文档注释,您可以在此阶段进行。

For this sort of workflow, driving everything from a single commit window is a lot simpler than firing off a bunch of separate git commands.

对于这种工作流程,从单个提交窗口驱动所有内容比触发一堆单独的 git 命令要简单得多。