简体   繁体   English

使用RStudio进行版本控制:如何比较和修改多个用户的文件

[英]Version control with RStudio: how to compare and modify files from multiple users

I am new to the use of version control in RStudio. 我是RStudio中使用版本控制的新手。 I would like to know what is the optimal way to do this: 我想知道执行此操作的最佳方法是什么:

  • I have a R project, and I can give one version of the project to a coworker. 我有一个R项目,可以将项目的一个版本提供给同事。
  • Then he will modify some files (and me too). 然后,他将修改一些文件(我也是)。
  • When he gives the folder back to me, is there is simple way to compare two files and decide which which lines go to the final version? 当他把文件夹还给我时,有没有简单的方法可以比较两个文件并确定哪几行可以进入最终版本?

The usual workflow for comparing files using builtin Rstudio is through version control tools such as git or subversion. 使用内置的Rstudio比较文件的通常工作流程是通过版本控制工具(如git或subversion)进行。

Your process is more "I give you the content of the project folder, make whatever you want and give it back to me" then "you want to know what have changed between your copy and his". 您的过程更多是“我给您项目文件夹的内容,根据您的需要做任何事情然后还给我”,然后是“您想知道您的副本与其副本之间发生了什么变化”。

Rstudio won't help you in this case. 在这种情况下,Rstudio不会为您提供帮助。 You'd better use merge tools such as meld, winmerge, .. that will spot the differences between files and their content and allow you to copy changes in either way (from you to him or him to you) 您最好使用合并工具,例如meld,winmerge,..,这些工具会发现文件及其内容之间的差异,并允许您以任何一种方式(从您到他或从他到他)复制更改

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

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