从 IDE 外部进行版本控制是一个好习惯吗? [英] Is it a good practise to do version control from outside the IDE?

查看:29
本文介绍了从 IDE 外部进行版本控制是一个好习惯吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不止一次从我的同行那里听到建议"不要在编写代码的 IDE 中对代码进行版本控制.我看到他们在 EclipseIntelliJ IDEA 等,但从命令行或独立客户端进行版本控制(在我当前的场景中 - Git),而不是使用IDE 可用的相应插件.

I have heard from my peers on more than one occasion that it is "advised" not to do version controlling of your code from within the IDE where you write it. I have seen them developing on Eclipse, IntelliJ IDEA, etc. but doing version control (in my current scenario - Git) from command-line or standalone clients as opposed to using the corresponding plugins readily available for the IDE.

虽然我在 Eclipse 中使用过版本控制插件并且从未发现任何问题,但我想知道一般规范是什么以及为什么?

Though I have used version control plugins in Eclipse and never found any issues, I would like to know what is the general norm and why?

推荐答案

我认为没有通用的规范.这个问题的答案非常主观.

I don't think that there's a general norm. The answer to the question is highly subjective.

我个人不使用任何 IDE 集成(甚至不使用 GUI 工具,除了内置的 git guigitk),因为我的经验告诉我这些工具行为与命令行版本不同和/或不提供命令行上可用的完整功能:

I personally don't use any IDE integration (not even a GUI tool, except the builtin ones git gui and gitk) because my experience told me that these tools behave different than the command line version and/or don't provide the full functionality available on the command line:

另一件事是,您对版本控制工具的了解与您的 IDE 息息相关.也许您想为使用 Eclipse 编辑的源(例如您的点文件)以外的其他内容设置一些版本管理.

Another thing is that your knowledge about your versioning tools is bound to your IDE. Maybe you want to set up some version management for other things than the sources you edit with Eclipse (your dotfiles, for example).

或者有一天你切换 IDE,放弃 Eclipse 并开始使用 Visual Studio.那么你不必只学习 Visual Studio,而且你还需要学习 VS 中的 Git 集成.

Or one day you switch your IDE, drop Eclipse and start using Visual Studio. Then you don't have to learn only Visual Studio but in addition you need to learn the Git integration in VS too.

我认为与我上面写的相比,在 IDE 内部使用版本控制工具没有任何明显的优势.

I think compared with what I've written above, there are no serious advantages that would legitimate the usage of version control tools from inside the IDE.

所以,IMO,从 IDE 内部进行版本控制是一种不好的做法它应该总是从外面.

So, IMO, it's a bad practice to do version control from inside the IDE and it should always be done from the outside.

这篇关于从 IDE 外部进行版本控制是一个好习惯吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆