简体   繁体   中英

How to migrate to Git from this setup (svn)

At work we are looking to improve our current way of working and we are thinking Git might be able to solve our problem.

Our current repo is hosted in SVN and looks like this:

MAIN ---trunk
     ---bugfix
CUSTOMER1
     ---trunk
     ---bugfix
CUSTOMER2
     ---trunk
     ---bugfix

Now here comes the joke :) Customer1 and 2 are basicly based on MAIN, however the main project needed customizations and they decided to split them off into 2 branches and rework several shared code of MAIN.

It has come to the point that you cant merge MAIN into customer1 or 2. Because to much code has been overwritten. When we apply a new feature or bugfix we must manually edit the code of MAIN, customer1, customer2, and EVEN in some cases the bugfix branches seperatly. We are spending 30 min coding a fix and 30 min copy pasting it to the other branches.

Yes we are aware this is a complete wrong way of working, however we want to change this.

I have some decent git knowledge and i know several other projects work like this, look @ chiliproject for example. Basicly we would like a setup like this maybe:

MAIN --- develop
     --- feature
     --- master
     --- bugfix
    \
     customer1
           --- ...

    \ 
     customer2

Maybe 3 repositories total, where customer 1 and 2 are based off MAIN. When we apply new code to MAIN we can simply pull it into customer1 and customer2. Could someone make a suggestion on how we can solve this?

Also i tried adding a remote repo to customer1, the remote beeing MAIN. when i fetch the latest revision i get all diffs from MAIN. Obviously since the code is pretty different at the moment i do not want to merge this. However i would like to pull in future revision1, which contains only a patch to hello.php for example.

Thanks

This little tutorial might help you with migrating: http://git-scm.com/book/en/Git-and-Other-Systems-Migrating-to-Git

Whether what you want/need is possible that remains unknown to me, but still, it might help.

I found it in the official Git website http://git-scm.com/ .

Hope this helps. :) (If this belongs as a comment then I'm sorry, I can't actually post comments in the main question for some reason.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM