Moving from git-svn to git2019 Community Moderator ElectionHow do I migrate an SVN repository with history to a new Git repository?How to remove local (untracked) files from the current Git working tree?What is the difference between 'git pull' and 'git fetch'?How to undo 'git add' before commit?How do I undo the most recent commits in Git?How do I force “git pull” to overwrite local files?How do I delete a Git branch both locally and remotely?Make the current Git branch a master branchHow to replace master branch in Git, entirely, from another branch?How to revert a Git repository to a previous commitHow do I rename a local Git branch?

Did Ender ever learn that he killed Stilson and/or Bonzo?

How do you talk to someone whose loved one is dying?

What are substitutions for coconut in curry?

New passport but visa is in old (lost) passport

Knife as defense against stray dogs

Does multi-classing into Fighter give you heavy armor proficiency?

Non-trivial topology where only open sets are closed

How to explain that I do not want to visit a country due to personal safety concern?

How can we have a quark condensate without a quark potential?

et qui - how do you really understand that kind of phraseology?

Is there a symmetric-key algorithm which we can use for creating a signature?

Different outputs for `w`, `who`, `whoami` and `id`

This word with a lot of past tenses

Recruiter wants very extensive technical details about all of my previous work

Encrypting then Base64 Encoding

How could an airship be repaired midflight?

Is it true that good novels will automatically sell themselves on Amazon (and so on) and there is no need for one to waste time promoting?

Is a party consisting of only a bard, a cleric, and a warlock functional long-term?

Why do passenger jet manufacturers design their planes with stall prevention systems?

Simplify an interface for flexibly applying rules to periods of time

What is the significance behind "40 days" that often appears in the Bible?

Bacteria contamination inside a thermos bottle

What's the meaning of a knight fighting a snail in medieval book illustrations?

Four married couples attend a party. Each person shakes hands with every other person, except their own spouse, exactly once. How many handshakes?



Moving from git-svn to git



2019 Community Moderator ElectionHow do I migrate an SVN repository with history to a new Git repository?How to remove local (untracked) files from the current Git working tree?What is the difference between 'git pull' and 'git fetch'?How to undo 'git add' before commit?How do I undo the most recent commits in Git?How do I force “git pull” to overwrite local files?How do I delete a Git branch both locally and remotely?Make the current Git branch a master branchHow to replace master branch in Git, entirely, from another branch?How to revert a Git repository to a previous commitHow do I rename a local Git branch?










0















We keep our project's main repository at SVN. Then, to make work easier, each of us did git svn clone SVN's trunk to git's master and we work using git flow. When our work is done within feature branch, we merge it into master and do git svn dcommit to push changes to SVN repository.



But now we need to abandon SVN repository and switch completely to git. How can we achieve it if we want to keep history and branches which haven't merged into master yet?



I thought it that way: we make a clean copy of current SVN repository with git svn clone and place it on our server - it will be our "central" repository. Now, we'll add this repository as remote to our existing repositories. But how can I do it? Can I change old master with the new one? Can I then merge old, not yet merged feature branches to new master without unnecessary conflicts?










share|improve this question






















  • The fact that each developer uses svn-git is irrelevant. Just follow any guide you can find for migrating from SVN to git.

    – mkasberg
    Mar 6 at 21:17











  • Possible duplicate of How do I migrate an SVN repository with history to a new Git repository?

    – mkasberg
    Mar 6 at 21:18











  • Well, I guess there are some inticacies about getting in-progress branches ported over. eftshift0's answer is a good one for those concerns.

    – mkasberg
    Mar 6 at 21:20















0















We keep our project's main repository at SVN. Then, to make work easier, each of us did git svn clone SVN's trunk to git's master and we work using git flow. When our work is done within feature branch, we merge it into master and do git svn dcommit to push changes to SVN repository.



But now we need to abandon SVN repository and switch completely to git. How can we achieve it if we want to keep history and branches which haven't merged into master yet?



I thought it that way: we make a clean copy of current SVN repository with git svn clone and place it on our server - it will be our "central" repository. Now, we'll add this repository as remote to our existing repositories. But how can I do it? Can I change old master with the new one? Can I then merge old, not yet merged feature branches to new master without unnecessary conflicts?










share|improve this question






















  • The fact that each developer uses svn-git is irrelevant. Just follow any guide you can find for migrating from SVN to git.

    – mkasberg
    Mar 6 at 21:17











  • Possible duplicate of How do I migrate an SVN repository with history to a new Git repository?

    – mkasberg
    Mar 6 at 21:18











  • Well, I guess there are some inticacies about getting in-progress branches ported over. eftshift0's answer is a good one for those concerns.

    – mkasberg
    Mar 6 at 21:20













0












0








0








We keep our project's main repository at SVN. Then, to make work easier, each of us did git svn clone SVN's trunk to git's master and we work using git flow. When our work is done within feature branch, we merge it into master and do git svn dcommit to push changes to SVN repository.



But now we need to abandon SVN repository and switch completely to git. How can we achieve it if we want to keep history and branches which haven't merged into master yet?



I thought it that way: we make a clean copy of current SVN repository with git svn clone and place it on our server - it will be our "central" repository. Now, we'll add this repository as remote to our existing repositories. But how can I do it? Can I change old master with the new one? Can I then merge old, not yet merged feature branches to new master without unnecessary conflicts?










share|improve this question














We keep our project's main repository at SVN. Then, to make work easier, each of us did git svn clone SVN's trunk to git's master and we work using git flow. When our work is done within feature branch, we merge it into master and do git svn dcommit to push changes to SVN repository.



But now we need to abandon SVN repository and switch completely to git. How can we achieve it if we want to keep history and branches which haven't merged into master yet?



I thought it that way: we make a clean copy of current SVN repository with git svn clone and place it on our server - it will be our "central" repository. Now, we'll add this repository as remote to our existing repositories. But how can I do it? Can I change old master with the new one? Can I then merge old, not yet merged feature branches to new master without unnecessary conflicts?







git svn version-control git-svn






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 6 at 20:49









Daniel GadawskiDaniel Gadawski

1,24131425




1,24131425












  • The fact that each developer uses svn-git is irrelevant. Just follow any guide you can find for migrating from SVN to git.

    – mkasberg
    Mar 6 at 21:17











  • Possible duplicate of How do I migrate an SVN repository with history to a new Git repository?

    – mkasberg
    Mar 6 at 21:18











  • Well, I guess there are some inticacies about getting in-progress branches ported over. eftshift0's answer is a good one for those concerns.

    – mkasberg
    Mar 6 at 21:20

















  • The fact that each developer uses svn-git is irrelevant. Just follow any guide you can find for migrating from SVN to git.

    – mkasberg
    Mar 6 at 21:17











  • Possible duplicate of How do I migrate an SVN repository with history to a new Git repository?

    – mkasberg
    Mar 6 at 21:18











  • Well, I guess there are some inticacies about getting in-progress branches ported over. eftshift0's answer is a good one for those concerns.

    – mkasberg
    Mar 6 at 21:20
















The fact that each developer uses svn-git is irrelevant. Just follow any guide you can find for migrating from SVN to git.

– mkasberg
Mar 6 at 21:17





The fact that each developer uses svn-git is irrelevant. Just follow any guide you can find for migrating from SVN to git.

– mkasberg
Mar 6 at 21:17













Possible duplicate of How do I migrate an SVN repository with history to a new Git repository?

– mkasberg
Mar 6 at 21:18





Possible duplicate of How do I migrate an SVN repository with history to a new Git repository?

– mkasberg
Mar 6 at 21:18













Well, I guess there are some inticacies about getting in-progress branches ported over. eftshift0's answer is a good one for those concerns.

– mkasberg
Mar 6 at 21:20





Well, I guess there are some inticacies about getting in-progress branches ported over. eftshift0's answer is a good one for those concerns.

– mkasberg
Mar 6 at 21:20












2 Answers
2






active

oldest

votes


















2














Let's start from the beginning: You should set up a "clean" svn clone on git without any of the private work that the separate developers did. This is so that you can all share the same revisions, otherwise people will have divergent histories that won't be able to get together.... or even worse, multiple revisions on git that actually match a single svn revision.



Then, each one of the developers can use this repo as an official "remote" that they can add to their current set up. Once they have that, they could rebase their private branches at will so that no one loses any of their previous work (I'm not saying this is a trivial thing.... each branch will have a different starting point so if you want to do the work correctly, each branch has to be treated separately.... might even consider using a script that could take care of the analysis of finding matches between the old svn revisions and the new revisions from the new common svn clone) and then you (each developer) can get rid of the original (svn) remote repo that they were using in the beginning so that you can now start interacting with pure git workflows and forget about the svn interactions.






share|improve this answer
































    0














    Since you abandon SVN completely you can tell everyone to commit their open feature branches into SVN branches at a certain cut-over date. Then "freeze" SVN, convert it to Git (including the feature branches). After that each developer can clone the new repository and continue work easily.



    Since SVN does not matter after the cut-over date the "dirty", half-ready feature branches don't matter any more.






    share|improve this answer






















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55031902%2fmoving-from-git-svn-to-git%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2














      Let's start from the beginning: You should set up a "clean" svn clone on git without any of the private work that the separate developers did. This is so that you can all share the same revisions, otherwise people will have divergent histories that won't be able to get together.... or even worse, multiple revisions on git that actually match a single svn revision.



      Then, each one of the developers can use this repo as an official "remote" that they can add to their current set up. Once they have that, they could rebase their private branches at will so that no one loses any of their previous work (I'm not saying this is a trivial thing.... each branch will have a different starting point so if you want to do the work correctly, each branch has to be treated separately.... might even consider using a script that could take care of the analysis of finding matches between the old svn revisions and the new revisions from the new common svn clone) and then you (each developer) can get rid of the original (svn) remote repo that they were using in the beginning so that you can now start interacting with pure git workflows and forget about the svn interactions.






      share|improve this answer





























        2














        Let's start from the beginning: You should set up a "clean" svn clone on git without any of the private work that the separate developers did. This is so that you can all share the same revisions, otherwise people will have divergent histories that won't be able to get together.... or even worse, multiple revisions on git that actually match a single svn revision.



        Then, each one of the developers can use this repo as an official "remote" that they can add to their current set up. Once they have that, they could rebase their private branches at will so that no one loses any of their previous work (I'm not saying this is a trivial thing.... each branch will have a different starting point so if you want to do the work correctly, each branch has to be treated separately.... might even consider using a script that could take care of the analysis of finding matches between the old svn revisions and the new revisions from the new common svn clone) and then you (each developer) can get rid of the original (svn) remote repo that they were using in the beginning so that you can now start interacting with pure git workflows and forget about the svn interactions.






        share|improve this answer



























          2












          2








          2







          Let's start from the beginning: You should set up a "clean" svn clone on git without any of the private work that the separate developers did. This is so that you can all share the same revisions, otherwise people will have divergent histories that won't be able to get together.... or even worse, multiple revisions on git that actually match a single svn revision.



          Then, each one of the developers can use this repo as an official "remote" that they can add to their current set up. Once they have that, they could rebase their private branches at will so that no one loses any of their previous work (I'm not saying this is a trivial thing.... each branch will have a different starting point so if you want to do the work correctly, each branch has to be treated separately.... might even consider using a script that could take care of the analysis of finding matches between the old svn revisions and the new revisions from the new common svn clone) and then you (each developer) can get rid of the original (svn) remote repo that they were using in the beginning so that you can now start interacting with pure git workflows and forget about the svn interactions.






          share|improve this answer















          Let's start from the beginning: You should set up a "clean" svn clone on git without any of the private work that the separate developers did. This is so that you can all share the same revisions, otherwise people will have divergent histories that won't be able to get together.... or even worse, multiple revisions on git that actually match a single svn revision.



          Then, each one of the developers can use this repo as an official "remote" that they can add to their current set up. Once they have that, they could rebase their private branches at will so that no one loses any of their previous work (I'm not saying this is a trivial thing.... each branch will have a different starting point so if you want to do the work correctly, each branch has to be treated separately.... might even consider using a script that could take care of the analysis of finding matches between the old svn revisions and the new revisions from the new common svn clone) and then you (each developer) can get rid of the original (svn) remote repo that they were using in the beginning so that you can now start interacting with pure git workflows and forget about the svn interactions.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 6 at 21:14

























          answered Mar 6 at 21:04









          eftshift0eftshift0

          5,1591020




          5,1591020























              0














              Since you abandon SVN completely you can tell everyone to commit their open feature branches into SVN branches at a certain cut-over date. Then "freeze" SVN, convert it to Git (including the feature branches). After that each developer can clone the new repository and continue work easily.



              Since SVN does not matter after the cut-over date the "dirty", half-ready feature branches don't matter any more.






              share|improve this answer



























                0














                Since you abandon SVN completely you can tell everyone to commit their open feature branches into SVN branches at a certain cut-over date. Then "freeze" SVN, convert it to Git (including the feature branches). After that each developer can clone the new repository and continue work easily.



                Since SVN does not matter after the cut-over date the "dirty", half-ready feature branches don't matter any more.






                share|improve this answer

























                  0












                  0








                  0







                  Since you abandon SVN completely you can tell everyone to commit their open feature branches into SVN branches at a certain cut-over date. Then "freeze" SVN, convert it to Git (including the feature branches). After that each developer can clone the new repository and continue work easily.



                  Since SVN does not matter after the cut-over date the "dirty", half-ready feature branches don't matter any more.






                  share|improve this answer













                  Since you abandon SVN completely you can tell everyone to commit their open feature branches into SVN branches at a certain cut-over date. Then "freeze" SVN, convert it to Git (including the feature branches). After that each developer can clone the new repository and continue work easily.



                  Since SVN does not matter after the cut-over date the "dirty", half-ready feature branches don't matter any more.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 6 at 21:33









                  A.H.A.H.

                  46.3k117198




                  46.3k117198



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55031902%2fmoving-from-git-svn-to-git%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                      Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                      Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved