Xiao Peng

My personal blog moves to xiaopeng.me , blogs about design patterns will be synced to here.
肖鹏,ThoughtWorks资深咨询师,目前关注于架构模式、敏捷软件开发等领域,并致力于软件开发最佳实践的推广和应用。
多次为国内大型企业敏捷组织转型提供咨询和培训服务,在大型团队持续集成方面具有丰富的经验。
  博客园 :: 首页 :: 联系 :: 订阅 订阅 :: 管理

公告

Using Git with SVN

Posted on 2012-08-11 23:37 勇敢的鸵鸟 阅读(...) 评论(...) 编辑 收藏

update: Some people prefer another solution: commit (git svn dcommit) from Trunk-Blue. The process is simliar, the benefit is that you do not have to switch between Green and Blue folders.

I am now working on a web project. Our local CI build takes more than 20 minutes now. While we are working to speed up the build, I am also trying to create a local build folder, so that I can still work (modify code) when the local build is running. The idea is quite simple. We have two folders, one for committing (named trunk-green) and the other for editing (named trunk-blue). When we want to run local build we sync the code from the committing folder. However the solution is not that simple, when it comes to a team of more than 10 developers and QAs working on it. I met a lot of problems, and I am not confident to promote it to others yet now. Anyway, I will record what I learned during working out the final solution.

 1. How to force git to overwrite local files on pull?

当双方代码有冲突时,直接git pull会报错。可以使用git fetch --all,然后git reset --hard origin/master。见http://stackoverflow.com/questions/1125968/force-git-to-overwrite-local-files-on-pull

下一步问题,为什么参考链接中出现:error: Untracked working tree file 'public/images/icon.gif' would be overwritten by merge.。