Rewrite history then pull repository?

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Rewrite history then pull repository?

From: Graeme Geldenhuys <hidden>
Date: 2016-06-15 22:47:03

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 -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/

Re: Rewrite history then pull repository?

From: Thomas Rast <hidden>
Date: 2016-06-15 22:47:03

Graeme Geldenhuys wrote:
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).

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

Re: Rewrite history then pull repository?

From: Graeme Geldenhuys <hidden>
Date: 2016-06-15 22:47:03

Thomas Rast wrote:
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 -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help