xcode 集成 TFS 版本控制的最佳方法是什么
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/70313/
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
What is the best way to integrate TFS version control
提问by
Working on implementing TFS throughout our organization. It is easy to integrate with .NET
projects and any platform that uses Eclipse or a derivative of Eclipse for editing.
What's the best way to use TFS version control with Xcode (now that I find out we need to write some iPhone apps)?
致力于在整个组织中实施 TFS。很容易与.NET
项目和任何使用 Eclipse 或 Eclipse 的衍生物进行编辑的平台集成。
在 Xcode 中使用 TFS 版本控制的最佳方法是什么(现在我发现我们需要编写一些 iPhone 应用程序)?
回答by Martin Woodward
Xcode integration is something that we at Teamprisehave been looking into a lot. One of the main problems for us is that Apple does not provide a version control API that we can hook into to add a new version control system to Xcode - for integrated version control it is either the systems that Apple provide access to or nothing at the moment.
Xcode 集成是我们Teamprise一直在研究的东西。我们面临的主要问题之一是 Apple 没有提供版本控制 API,我们可以将其挂钩以将新的版本控制系统添加到 Xcode - 对于集成版本控制,它要么是 Apple 提供访问的系统,要么不提供任何访问权限。片刻。
That said, we do have a number of customers who develop in Xcode for TFS. They either use Teamprise Explorer(which is a standalone GUI client to TFS compiled as a Universal Binary) or they have macros inside Xcode that perform basic check-out and get operations in-conjunction with the TFS command line (tf). It's obviously not the ideal experience but acceptable for them. The stand-alone GUI has the advantage that you can do all the work item tracking stuff there as well and integrate this with your check-ins.
也就是说,我们确实有许多客户在 Xcode 中为 TFS 进行开发。他们要么使用Teamprise Explorer(它是 TFS 的独立 GUI 客户端,编译为通用二进制文件),要么在 Xcode 中使用宏来执行基本检出并与TFS 命令行 (tf)结合使用。这显然不是理想的体验,但对他们来说是可以接受的。独立 GUI 的优点是您也可以在那里进行所有工作项跟踪,并将其与您的签入集成。
Sorry if this is a very "marketing" type answer - just trying to let you know what our current customers do with Xcode. If you want more details around the macro approach then let me know.
对不起,如果这是一个非常“营销”类型的答案 - 只是想让您知道我们当前的客户使用 Xcode 做什么。如果您想了解有关宏方法的更多详细信息,请告诉我。
Hope that helps,
希望有所帮助,
Martin.
马丁。
回答by Sergey Kucher
回答by Encryptic
Perhaps SVNBridge will do the trick, it's an open source used at CodePlex (Microsoft's Open Source Hosting). Check it out here: http://www.codeplex.com/SvnBridge
也许 SVNBridge 可以解决这个问题,它是 CodePlex(微软的开源托管)使用的开源。在这里查看:http: //www.codeplex.com/SvnBridge
I have limited experience with it other than using it briefly to connect to CodePlex.
除了简单地使用它连接到 CodePlex 之外,我对它的经验有限。
回答by Chris Hanson
One way would be to use the Team Foundation System client under Windows in VMWare, and check out (or whatever TFS calls it) your sources to a directory on your Mac that's shared with the virtual machine. It also looks like Teamprisehas a Team Foundation client for Mac OS X built atop Eclipse that would be worth looking into.
一种方法是在 VMWare 中的 Windows 下使用 Team Foundation System 客户端,并将您的源代码检出(或任何 TFS 调用它的名称)到 Mac 上与虚拟机共享的目录中。看起来Teamprise有一个用于 Mac OS X 的 Team Foundation 客户端,它构建在 Eclipse 之上,值得研究。
That said, I'd very strongly encourage you to use a nativelycross-platform source code management system like Subversion or Perforce instead of a platform-specific silo like Team Foundation System for your company's soruce code, especially since you're going to be doing multi-platform development.
也就是说,我强烈建议您使用像 Subversion 或 Perforce 这样的本地跨平台源代码管理系统,而不是像 Team Foundation System 这样的平台特定的筒仓来管理您公司的源代码,尤其是因为您将要成为做多平台开发。
While you're not likely to share code between a .NET application and an iPhone application, having full cross-platform access to things like design documents can be really important. Mac OS X 10.5 and later include Subversion, Perforce is readily available, and both Perforce and Subversion are natively supported by the Xcode IDE. Subversion in particular is also more likely to be familiar to experienced Mac and iPhone developers you might bring onto your projects as you ramp up.
虽然您不太可能在 .NET 应用程序和 iPhone 应用程序之间共享代码,但对设计文档等内容的完全跨平台访问可能非常重要。Mac OS X 10.5 及更高版本包括 Subversion,Perforce 很容易获得,并且 Perforce 和 Subversion 都由 Xcode IDE 原生支持。经验丰富的 Mac 和 iPhone 开发人员也更可能熟悉 Subversion,您可能会在您的项目中加入。
回答by Indra
Follow this links, its raeally helpful:
按照这个链接,它真的很有帮助:
https://www.visualstudio.com/get-started/cross-platform/share-your-xcode-projects-vs
https://www.visualstudio.com/get-started/cross-platform/share-your-xcode-projects-vs
After that Check-in your existing xCode project code into TFS
之后将您现有的 xCode 项目代码签入 TFS
On your Mac, download and extract www.microsoft.com/en-us/download/details.aspx?id=30474. I placed it in /users/{myuseraccount}/git-tf
在 Mac 上,下载并解压缩www.microsoft.com/en-us/download/details.aspx?id=30474。我把它放在/users/{myuseraccount}/git-tf
Open Terminal and run the following commands
打开终端并运行以下命令
export JAVA_HOME=/Library/Java/Home
export PATH=$PATH:$JAVA_HOME/bin:/git_t
export PATH="/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/":$PATH
export PATH="/Users/{myuseraccount}//Git-Tf/":$PATH
change the working directory to your xCode project folder:
将工作目录更改为您的 xCode 项目文件夹:
e.g.: cd “/users/{myuseraccount}/documents/xCode Projects/testproject1/”
例如: cd “/users/{myuseraccount}/documents/xCode Projects/testproject1/”
In terminal fire commond:
在终端火灾中:
- git remote add origin url//companyName.visualstudio.com/DefaultCollection/_git/xyz
and than
然后
git push -u origin --all
It'll directly push your project into Visual studio TFS server..!!!!
它会直接将您的项目推送到 Visual Studio TFS 服务器中......!!!
回答by Scott White
The biggest problem with this is that Xcode only runs on OS X and TFS client tools only run on Windows. If you're host operating system in OS X and you have a Windows virtual environment running locally (like Parallels or VMFusion) then you could use Team Explorer or the command-line tools to work with the repository.
最大的问题是 Xcode 只能在 OS X 上运行,而 TFS 客户端工具只能在 Windows 上运行。如果您是 OS X 中的主机操作系统,并且您有一个在本地运行的 Windows 虚拟环境(如 Parallels 或 VMFusion),那么您可以使用 Team Explorer 或命令行工具来处理存储库。
But this is a lot of work just to use a really dated version control system. If you don't have to use TFS I would probably use SVN or something else with native OS X support.
但这只是为了使用一个真正过时的版本控制系统需要做很多工作。如果您不必使用 TFS,我可能会使用 SVN 或其他具有本机 OS X 支持的东西。