Rewrite history then pull repository?
Hi,
I pushed a repository to Github (a mirror of SubVersion repository). I then had some screwup with 'git svn rebase' when I should have used 'git svn fetch'. Anyway I managed to fix the issue locally and then forced the push to GitHub. This rewrote the history for the HEAD commit and gave it a different date and SHA1.
What will now happen to developers that cloned the repository before the
history rewrite and then do a 'git pull' after the history rewrite?
Will git automatically sort out the mess, or is it going to post some warning? The content of that screwed up commit stayed exactly the same, only the date of the commit changed which then generated a different SHA1.
If a warning, what must they do to resolve the issue on there PC's?
Regards,
- Graeme -
Signature · 2 lines
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/
Quoted 9 lines · Graeme Geldenhuys
I pushed a repository to Github (a mirror of SubVersion repository). I then had some screwup with 'git svn rebase' when I should have used 'git svn fetch'. Anyway I managed to fix the issue locally and then forced the push to GitHub. This rewrote the history for the HEAD commit and gave it a different date and SHA1.
What will now happen to developers that cloned the repository before the
history rewrite and then do a 'git pull' after the history rewrite?
See the "Recovering From Upstream Rebase" section in man git-rebase, also available online at
http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html
(especially useful if your local git is older than 1.6.1 and doesn't have this section yet).
Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.chQuoted 3 lines · Thomas Rast
See the "Recovering From Upstream Rebase" section in man git-rebase, also available online at
Thanks for the link. Luckily I had a clone (backup) of my repository before the upstream rebase. So I could play around and see what happens to developers downstream. I used the 'gitk --all' to see the history and visualize what I had to do. I managed to figure out that 'git rebase origin' would solve the problem, and the documentation you mentioned confirmed that. :-)
Thanks again for the quick reply.
Regards,
- Graeme -
Signature · 2 lines
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/