简体   繁体   English

Rstudio和版本控制设施

[英]Rstudio and version control facilities

I have a question regarding the version control integration in Rstudio. 我对Rstudio中的版本控制集成有疑问。

What's the advantage of using it instead of an external version control manager like SourceTree? 使用它代替诸如SourceTree这样的外部版本控制管理器有什么优势?

From what I understand the main advantage is to avoid using another tool and saving the switch from a window to another. 据我了解,主要优点是避免使用其他工具,并将切换从窗口保存到另一个窗口。

But the problem is we often need to use other languages in a data mining projects (SQL, Python, ...) so in almost every scenario we also need a dedicated version control manager. 但是问题是我们经常需要在数据挖掘项目中使用其他语言(SQL,Python等),因此在几乎每种情况下,我们还需要一个专用的版本控制管理器。

It's not an either/or . 它不是一个或非 Think of RStudio's version control as a way to accomplish your most common source control tasks without leaving the IDE. 将RStudio的版本控制视为无需离开IDE即可完成最常见的源代码控制任务的一种方式。 For instance, press Ctrl + Alt + D to see a diff of the current file. 例如,按Ctrl + Alt + D查看当前文件的差异。 How long would that take using an external tool? 使用外部工具需要多长时间?

Likewise, you can easily commit a change in just a few keystrokes (try Ctrl + Alt + M ), and you're never more than a click away from seeing which branch you're on. 同样,您只需几次击键即可轻松进行更改(请按Ctrl + Alt + M ),并且只需单击一下即可看到您所在的分支。

Most IDEs have some basic form of version control built-in for this reason. 因此,大多数IDE都内置了一些基本形式的版本控制。 It isn't intended to completely replace any VCS tools you're using; 它并不打算完全替代您正在使用的任何VCS工具; it's intended to keep you from having to switch context when you're doing common tasks. 这样做是为了避免您在执行常见任务时不得不切换上下文。 You will still need to use an external VCS for more complicated operations. 您仍然需要使用外部VCS进行更复杂的操作。

Another thing to keep in mind is that RStudio can manage your whole data science project, not just its R code. 要记住的另一件事是,RStudio可以管理您的整个数据科学项目,而不仅仅是R代码。 You can use its VCS integration to manage and commit changes to files of any kind. 您可以使用其VCS集成来管理和提交对任何类型文件的更改。 We sometimes use it as a VCS interface to projects that contain no R code at all! 有时我们将它用作VCS接口,以用于完全不包含R代码的项目!

Some people prefer to do everything VCS-related in a single interface. 有些人喜欢在单个界面中完成所有与VCS相关的事情。 That's great, and hopefully the RStudio VCS integration stays out of your way if that's your workflow. 太好了,如果这是您的工作流程,希望RStudio VCS集成不会对您造成影响。 But most IDE users like being able to do day-to-day VCS operations without breaking context, and that's what the VCS integration in RStudio is for. 但是大多数IDE用户都希望能够在不破坏上下文的情况下进行日常VCS操作,这就是RStudio中的VCS集成的目的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM