开发者

VCS Migration to Git - How is my approach?

I just inherited a large web project using SVN for VCS. There are no branches, and the project has been abandoned for the past four months - it's pretty stable.

I plan on migrating the SVN to Git (using gitosis) while I have the opportunity - so I'll be converting the SVN history into the master branch of the new Git repository I'm putting in place.

Thanks to a myriad of other questions here, I definitely have that part covered - from there, I plan to create a branch for each stage of development - alpha, dev, stage, and prod, and have those servers pull the branches that they "belong" to. I also plan on merging upwards (commit to alpha, merge with dev, merge with stage, so on) and pushing to prod.

I think this is the best plan for 开发者_如何学JAVAthis kind of environment, but I'm wondering if there are any gotchas or anything that I should be aware of before I get started. Your insight is much appreciated!


You could consider:

  • using gitolite instead of the obsolete gitosis (for the authorization layer)
  • creating several Git repo for isolating coherent subset of the initial SVN repo.
  • taking into account the identification and authorization aspects which don't exist with a DVCS: even if you are mapping your SVN users for the migration (as described by manojlds in his answer), nothing prevent them to commit with any 'user.name' they want once they are working with the new Git repo.


One thing is that you must have a authors map file that will app SVN usernames to Git users with username and email. There are scripts to generate such an authors file, something like:

svn log | grep -E "r[0-9]+ \| .+ \|" | awk '{print $3}' | sort | uniq

You can make use of svn2git for the conversion.

But I think you might have the above two covered or have other ways of doing it, but just mentioning as the authors file might not be mentioned in many places.

You can also look into git-flow for establishing your and your team's workflow.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜