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?
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
add a comment |
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
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
add a comment |
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
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
git svn version-control git-svn
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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.
add a comment |
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
edited Mar 6 at 21:14
answered Mar 6 at 21:04
eftshift0eftshift0
5,1591020
5,1591020
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Mar 6 at 21:33
A.H.A.H.
46.3k117198
46.3k117198
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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