[英]How best to use both Xcode and Visual Studio with the same git repo?
Apologies for a newbie question. 道歉的新手问题。 I'm setting up a code repository and project(s) for my company; 我正在为我的公司设置代码存储库和项目。 ultimately I'll be bringing on more experienced programmers than I - but I want to do sensible things from the ground up. 最终,我将聘请比我更有经验的程序员-但我想从头开始做明智的事情。
I've been working on a c++ library project in Visual Studio, with a git repository. 我一直在使用git存储库在Visual Studio中研究c ++库项目。 VS is a nice development environment but I'd also like to work on my mac (and deploy for the mac). VS是一个不错的开发环境,但我也想在Mac上工作(并为Mac部署)。
I like the fact that my VS Project is all set up with different configurations for debug builds etc etc - it really makes compilation etc very easy. 我喜欢这样的事实,我的VS Project都针对调试版本等设置了不同的配置-这确实使编译等非常容易。 Git of course is now supported by VS so I can manage my repo from within the same interface. VS当然现在支持Git,因此我可以在同一界面中管理我的仓库。 I'd like to be able to do the same on my mac with an Xcode Project. 我希望能够在Mac上使用Xcode项目执行相同的操作。
Questions: 问题:
I'd be grateful for any comments on the subject of multiple projects on the same source, or of course more specific answers. 对于在同一来源的多个项目的任何评论,或者更具体的答案,我将不胜感激。
Thanks, 谢谢,
Tom 汤姆
It is indeed very sensible to use the same source control for both types of projects. 在两种类型的项目中使用相同的源代码控制确实是非常明智的。
Yes, I'm sure it is. 是的,我确定是。 I'm using git both at work and for my hobby projects at home. 我在工作中和在家中的业余项目中都使用git。
I'm pretty sure that both MS and Apple tools are also able to interact with an existing git repository. 我非常确定,MS和Apple工具也都可以与现有的git存储库进行交互。 You may well have to manually build the project in the respective tools - but this is simply because "Create new project" is really not meant for when you already have a bunch of source-files in the first place. 您可能必须在相应的工具中手动构建项目-但这仅仅是因为“开始创建新项目”实际上并不适合您已经拥有大量源文件的情况。
For a larger project with many different parts, you will probably also want to have several project files that use the same source files, so you will need to somehow manage these things in a way that doesn't involve just clicking a few places. 对于具有许多不同部分的较大项目,您可能还希望有几个使用相同源文件的项目文件,因此您将需要以某种方式管理这些内容,而不仅仅是单击几个位置。 But once you have built your project definition files for the respective IDE, it should be perfectly fine to store all your source and project definitions in a git repo. 但是,一旦为相应的IDE构建了项目定义文件,就可以将所有源代码和项目定义存储在git仓库中,这是完全可以的。
And yes, you want a single repo for all (or as much as you can of the) related source - otherwise you will need to keep track of, for example, which version of your project X goes with which version of test Y (because ultimately, you will update X to work differently, so test Y will need to be changed simultaneously - much easier to do that if you have one version control repo than if you have, say, your testcode in one repo and the production code for project X in another repo - it is generally hard enough to do these things with a single repo!). 是的,您想要所有(或尽可能多)相关源的单个仓库-否则,您将需要跟踪例如项目X的哪个版本与测试Y的哪个版本(因为最终,您将更新X使其工作方式不同,因此需要同时更改测试Y-如果您只有一个版本控制存储库,则比做一个版本控制库中的测试代码和项目的生产代码要容易得多X在另一个仓库中-通常很难通过一个仓库来完成这些事情!)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.