Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat are the practical consequences of rewriting GIT history?
    text
    copied!<p>Our project has been using git for a week or so now, and we're all enjoying it a lot (usíng it in a tight collaborative group turns out to be quite a different git experience). To keep things as simple as possible, we do not do any rebasing or history modifications. But we did make a few mistakes in the first week. A few commits were made that shouldn't have been done, and we managed to merge a feature branch into the wrong integration branch (1.1 instead of 1.0). And we didn't find out about these things until they were long into our history.</p> <p>Now I see a lot of warnings about rewriting history, but I'm not really sure I understand the dangers involved. We use a shared bare repository, and all branches are pushed there for backup.</p> <p>I would expect that if you rewrite history (say remove a commit), the full list of subsequent commits will "lose" that commit (and maybe not compile/work). I would also expect that if this happens I could actually choose to fix this at the top of history (and just leave that part of history as non-compiling).</p> <ul> <li>If I rewrite history (and everything compiles/works in all affected branches), will my co-workers need to do any special commands)? (In other words, will they "know that I have done it" if I did it well?)</li> <li>Will any users with local changes that I do not know about be eligible for merge failures on git pull?</li> <li>Am I missing anything essential here?</li> </ul> <p>Any references to articles/tutorials on this subject would also be really nice.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload