{"thread":{"id":"20096","subject":"Rewrite history then pull repository?","startedAt":"2009-07-13T08:42:42Z","lastAt":"2009-07-13T09:38:01Z","messageCount":3,"participants":["Graeme Geldenhuys","Thomas Rast"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"117891","messageId":"h3es3p$ie6$1@ger.gmane.org","threadId":"20096","inReplyTo":null,"subject":"Rewrite history then pull repository?","fromName":"Graeme Geldenhuys","fromEmail":"graemeg@gmail.com","sentAt":"2009-07-13T08:42:42Z","receivedAt":"2009-07-13T08:42:42Z","isPatch":false,"sender":{"key":"graemeg@gmail.com","avatar":"https://gravatar.com/avatar/fdaae0cf0a07bd33782720fb37ae0450f504d4e04c57c6e8f3517d11d503fdc6?d=mp&s=160"},"body":"\nHi,\n\nI pushed a repository to Github (a mirror of SubVersion repository). I \nthen had some screwup with 'git svn rebase' when I should have used 'git \nsvn fetch'.  Anyway I managed to fix the issue locally and then forced \nthe push to GitHub. This rewrote the history for the HEAD commit and \ngave it a different date and SHA1.\n\nWhat will now happen to developers that cloned the repository before the \n  history rewrite and then do a 'git pull' after the history rewrite? \nWill git automatically sort out the mess, or is it going to post some \nwarning? The content of that screwed up commit stayed exactly the same, \nonly the date of the commit changed which then generated a different SHA1.\n\nIf a warning, what must they do to resolve the issue on there PC's?\n\nRegards,\n   - Graeme -\n\n-- \nfpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal\nhttp://opensoft.homeip.net/fpgui/\n"},{"id":"117892","messageId":"200907131058.15118.trast@student.ethz.ch","threadId":"20096","inReplyTo":"h3es3p$ie6$1@ger.gmane.org","subject":"Re: Rewrite history then pull repository?","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-07-13T08:58:10Z","receivedAt":"2009-07-13T08:58:10Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Graeme Geldenhuys wrote:\n> \n> I pushed a repository to Github (a mirror of SubVersion repository). I \n> then had some screwup with 'git svn rebase' when I should have used 'git \n> svn fetch'.  Anyway I managed to fix the issue locally and then forced \n> the push to GitHub. This rewrote the history for the HEAD commit and \n> gave it a different date and SHA1.\n> \n> What will now happen to developers that cloned the repository before the \n>   history rewrite and then do a 'git pull' after the history rewrite? \n\nSee the \"Recovering From Upstream Rebase\" section in man git-rebase,\nalso available online at\n\n  http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html\n\n(especially useful if your local git is older than 1.6.1 and doesn't\nhave this section yet).\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"117894","messageId":"h3evbh$r8n$1@ger.gmane.org","threadId":"20096","inReplyTo":"200907131058.15118.trast@student.ethz.ch","subject":"Re: Rewrite history then pull repository?","fromName":"Graeme Geldenhuys","fromEmail":"graemeg@gmail.com","sentAt":"2009-07-13T09:38:01Z","receivedAt":"2009-07-13T09:38:01Z","isPatch":false,"sender":{"key":"graemeg@gmail.com","avatar":"https://gravatar.com/avatar/fdaae0cf0a07bd33782720fb37ae0450f504d4e04c57c6e8f3517d11d503fdc6?d=mp&s=160"},"body":"Thomas Rast wrote:\n> \n> See the \"Recovering From Upstream Rebase\" section in man git-rebase,\n> also available online at\n\nThanks for the link. Luckily I had a clone (backup) of my repository \nbefore the upstream rebase. So I could play around and see what happens \nto developers downstream. I used the 'gitk --all' to see the history and \nvisualize what I had to do. I managed to figure out that 'git rebase \norigin' would solve the problem, and the documentation you mentioned \nconfirmed that. :-)\n\nThanks again for the quick reply.\n\n\nRegards,\n   - Graeme -\n\n-- \nfpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal\nhttp://opensoft.homeip.net/fpgui/\n"}]}