Using Git with SVN

Source: Internet
Author: User

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 (namedTrunk-green) And the other for editing (namedTrunk-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?

When there is a conflict between the two sides of the Code, git pull directly reports an error. You can use git fetch -- all, and then git reset -- hard origin/master. See http://stackoverflow.com/questions/1125968/force-git-to-overwrite-local-files-on-pull

For more information, see the following link: error: Untracked working tree file 'public/images/icon.gif 'wocould be overwritten by merge ..

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.