xcode – 使用git和svn的好习惯

Subversion在几年前很流行,现在git正在变得流行,越来越多的人想用git替换Subversion.

问题是很多项目都是基于Subversion的.所以问题是如何与Subversion一起使用git.不要完全替换svn,并使用git.

我可以想出的最简单的方法是创建基于您已经签出的Subversion分支代码的git.然后使用git来控制本地.修改后,提交给本地git服务器,然后使用Subversion退出到远程服务器. Subversion就像容器中包含git一样.

BTW,我使用xcode 3.x进行编码,之前尝试使用xcode 4,但令人失望. (Xcode 4已经出来了,但还没有重试)

你怎么想 ?还是更好的选择?

谢谢

解决方法

Subversion is just like container to contain git

请务必阅读git-svn附带的CAVEATS部分:

CAVEATS

For the sake of simplicity and interoperating with a less-capable system (SVN),it is recommended that all git svn users clone,fetch and dcommit directly from the SVN server,and avoid all git clone/pull/merge/push operations between git repositories and branches.
The recommended method of exchanging code between git branches and users is git format-patch and git am,or just ‘dcommit’ing to the SVN repository.

Running git merge or git pull is NOT recommended on a branch you plan to dcommit from.
Subversion does not represent merges in any reasonable or useful fashion; so users using Subversion cannot see any merges you’ve made. Furthermore,if you merge or pull from a git branch that is a mirror of an SVN branch,dcommit may commit to the wrong branch.

所以你可以使用Git的任何合并和publication工作流程,只要你离开SVN分支机构就可以独立镜像(合并或者退出).

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...