3 ms·
That sequence of actions is how you would fix the timeline represented by the git repo, but each time you make a fix, the previous version of the timeline is er
by rcthompson 10y ago
That sequence of actions is how you would fix the timeline represented by the git repo, but each time you make a fix, the previous version of the timeline is erased[1] by the force push. There is no mechanism to record the history of all the modifications you have made to the timeline. For this, you need a second git repo.
It might help to think of it in terms of time travel and alternate universes. You go back in time and kill Hitler, and now the entire timeline from that point onward is different. But maybe you decide that you need to go back in time and make further changes to history, e.g. preventing the assassination that triggered WW1. Every change you make creates a new universe, and now you need a way to keep track of all the alternate universes that you created, in case one of your changes turns out to make things worse. You need to keep track of the history of each universe, and you also need to keep track of the history of alternate universes that you created by changing history. There's now two levels of history, hence two git repos.
[1] Technically it's not erased until the next garbage collection, but that's beside the point.