{"thread":{"id":"16185","subject":"How to rebase for git svn?","startedAt":"2008-11-05T19:09:00Z","lastAt":"2008-11-06T20:05:46Z","messageCount":5,"participants":["Yang Zhang","Eric Wong","Sverre Rabbelier","Björn Steinbrink"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"94988","messageId":"4911EF4C.8030703@gmail.com","threadId":"16185","inReplyTo":null,"subject":"How to rebase for git svn?","fromName":"Yang Zhang","fromEmail":"yanghatespam@gmail.com","sentAt":"2008-11-05T19:09:00Z","receivedAt":"2008-11-05T19:09:00Z","isPatch":false,"sender":{"key":"yanghatespam@gmail.com","avatar":"https://gravatar.com/avatar/e0796ebc342b90612276b87755da4abc776ddfebbc23049a79bb8b192570161d?d=mp&s=160"},"body":"Hi, I made a git svn repository from an svn repository.  Then I cloned \nthe git repository, committed some changes to the clone, and pulled back \nto the original repository.  However, now the original repository gives \nme conflicts whenever I run git svn rebase.  I believe this is because \ngit pull treats the other repository's commits as a branch and merges \nthem back instead of rebasing them and maintaining the type of linear \nhistory that is good for playing with svn.  Any hints as to how to fix \nthis?  I think the solution is to undo the merge that resulted from the \npull, but I don't know how to do this.\n\nI wrote a simple script reproducing exactly what's going on (along with \na transcript of its output).  I tried to make it as simple as possible, \nbut it can probably be simplified even more to reproduce the problem:\n\nhttp://assorted.svn.sourceforge.net/viewvc/assorted/sandbox/trunk/src/git/gitsvn.bash?revision=1057&view=markup\n\nThanks in advance for any help!\n-- \nYang Zhang\nhttp://www.mit.edu/~y_z/\n"},{"id":"95038","messageId":"20081106095500.GA9587@untitled","threadId":"16185","inReplyTo":"4911EF4C.8030703@gmail.com","subject":"Re: How to rebase for git svn?","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-11-06T09:55:00Z","receivedAt":"2008-11-06T09:55:00Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Yang Zhang <yanghatespam@gmail.com> wrote:\n> Hi, I made a git svn repository from an svn repository.  Then I cloned  \n> the git repository, committed some changes to the clone, and pulled back  \n> to the original repository.  However, now the original repository gives  \n> me conflicts whenever I run git svn rebase.  I believe this is because  \n> git pull treats the other repository's commits as a branch and merges  \n> them back instead of rebasing them and maintaining the type of linear  \n> history that is good for playing with svn.  Any hints as to how to fix  \n> this?  I think the solution is to undo the merge that resulted from the  \n> pull, but I don't know how to do this.\n>\n> I wrote a simple script reproducing exactly what's going on (along with  \n> a transcript of its output).  I tried to make it as simple as possible,  \n> but it can probably be simplified even more to reproduce the problem:\n>\n> http://assorted.svn.sourceforge.net/viewvc/assorted/sandbox/trunk/src/git/gitsvn.bash?revision=1057&view=markup\n>\n> Thanks in advance for any help!\n\nHi,\n\nTry passing --rebase or --squash with \"git pull\" to keep history linear\nfor SVN.\n\n-- \nEric Wong\n"},{"id":"95039","messageId":"bd6139dc0811060215j1ad7ee0ahd0b568283da06cb@mail.gmail.com","threadId":"16185","inReplyTo":"20081106095500.GA9587@untitled","subject":"Re: How to rebase for git svn?","fromName":"Sverre Rabbelier","fromEmail":"alturin@gmail.com","sentAt":"2008-11-06T10:15:21Z","receivedAt":"2008-11-06T10:15:21Z","isPatch":false,"sender":{"key":"alturin@gmail.com","avatar":null},"body":"On Thu, Nov 6, 2008 at 10:55, Eric Wong <normalperson@yhbt.net> wrote:\n> Yang Zhang <yanghatespam@gmail.com> wrote:\n>> Thanks in advance for any help!\n>\n> Try passing --rebase or --squash with \"git pull\" to keep history linear\n> for SVN.\n\nConsider doing the following:\ngit config alias.repull \"pull --rebase\"\nAnd then using 'git repull' instead of 'git pull'.\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"95041","messageId":"20081106102425.GA4192@atjola.homenet","threadId":"16185","inReplyTo":"bd6139dc0811060215j1ad7ee0ahd0b568283da06cb@mail.gmail.com","subject":"Re: How to rebase for git svn?","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2008-11-06T10:24:25Z","receivedAt":"2008-11-06T10:24:25Z","isPatch":false,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"On 2008.11.06 11:15:21 +0100, Sverre Rabbelier wrote:\n> On Thu, Nov 6, 2008 at 10:55, Eric Wong <normalperson@yhbt.net> wrote:\n> > Yang Zhang <yanghatespam@gmail.com> wrote:\n> >> Thanks in advance for any help!\n> >\n> > Try passing --rebase or --squash with \"git pull\" to keep history linear\n> > for SVN.\n> \n> Consider doing the following:\n> git config alias.repull \"pull --rebase\"\n> And then using 'git repull' instead of 'git pull'.\n\nOr set branch.<name>.rebase in your config and just use \"git pull\" ;-)\nSetting branch.autosetuprebase might also be useful in that case.\n\nYou should be careful to make sure that the other side does not lag\nbehind WRT svn, though. Otherwise, you end up rebasing commits that\ncorresponds to svn revisions. Bad.\n\nBjörn\n"},{"id":"95077","messageId":"49134E1A.9090908@gmail.com","threadId":"16185","inReplyTo":"20081106102425.GA4192@atjola.homenet","subject":"Re: How to rebase for git svn?","fromName":"Yang Zhang","fromEmail":"yanghatespam@gmail.com","sentAt":"2008-11-06T20:05:46Z","receivedAt":"2008-11-06T20:05:46Z","isPatch":false,"sender":{"key":"yanghatespam@gmail.com","avatar":"https://gravatar.com/avatar/e0796ebc342b90612276b87755da4abc776ddfebbc23049a79bb8b192570161d?d=mp&s=160"},"body":"Björn Steinbrink wrote:\n> On 2008.11.06 11:15:21 +0100, Sverre Rabbelier wrote:\n>> On Thu, Nov 6, 2008 at 10:55, Eric Wong <normalperson@yhbt.net> wrote:\n>>> Yang Zhang <yanghatespam@gmail.com> wrote:\n>>>> Thanks in advance for any help!\n>>> Try passing --rebase or --squash with \"git pull\" to keep history linear\n>>> for SVN.\n>> Consider doing the following:\n>> git config alias.repull \"pull --rebase\"\n>> And then using 'git repull' instead of 'git pull'.\n> \n> Or set branch.<name>.rebase in your config and just use \"git pull\" ;-)\n> Setting branch.autosetuprebase might also be useful in that case.\n> \n> You should be careful to make sure that the other side does not lag\n> behind WRT svn, though. Otherwise, you end up rebasing commits that\n> corresponds to svn revisions. Bad.\n> \n> Björn\n\ngit pull --rebase doesn't seem to be working either....\n\nhttp://assorted.svn.sourceforge.net/viewvc/assorted/sandbox/trunk/src/git/gitsvn.bash?revision=1064&view=markup\n-- \nYang Zhang\nhttp://www.mit.edu/~y_z/\n"}]}