Home > Enterprise >  If a git rebase is found to be in-progress, are the local files affected?
If a git rebase is found to be in-progress, are the local files affected?

Time:01-26

I have a website being served, and someone began (but did not complete) an interactive rebase. I want to know if aborting the rebase will affect the actual current state of the files being served. Since I am ok with the state of the website as it appears when I visit it, I would guess that aborting the rebase would not affect the contents of the files being served, but rather there are changes incoming that would appear on the website if I were to git release --continue.

CodePudding user response:

A rebase is a series of merges. (Actually it's a series of cherry picks but a cherry pick is a merge.) A merge is enacted in the working tree. Aborting will reset the working tree back to what it was like before the rebase started, which therefore is probably not the situation as you see it now.

However, it might be, namely if the rebase never even started (the todo list was formed but never used, for instance). And it is trivial to find out: just diff the working tree with the situation before the rebase started (which you can obtain from the reflog).

  • Related