-
Notifications
You must be signed in to change notification settings - Fork 33
Allow dropping / removing commits in interactive mode #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
A key invariant this tool operates on is that your actual file state doesn't change. Now, this could work by warning you that your file state will change, and then applying those changes to the working directory. You can do this now by moving the commit to the end and replacing "pick" with "index". |
As @Manishearth mentioned, this tool currently tries to avoid changes which would cause your checkout to be modified, such as removing commits. It'll require some design work to figure out if and how a feature like this fits into the |
It would just feel natural that the regular features that are supported by git rebase --interactive would also be supported by git revise --interactive, otherwise i would have to sometime follow up a revise with a rebase, and that will touch the checkout, and thus could cause rebuilds. |
This tool is designed for a specific kind of history editing, though, it's not a drop in rebase replacement |
@alcroito The only case I can think of that would fit this tool would be dropping empty commits, which are pretty rare in practice. I for one would expect to have to do a |
The empty commit dropping also works OK. If you need to do that you can |
Savvy. |
I feel like it would be pretty straightforward and ergonomic to internally treat Given that, it doesn't seem that |
I found this issue while looking into a faster interactive git rebase for a special use case. I have a git history with a few 1000 commits exported from a wiki. Some of these commits are spam, generally followed by spam removal commit later (not necessarily the next commit which could be to a different file). I'm trying to rebase to drop the spam commits, which in turn mean the spam-reverts become empty commits, and I'll probably want to drop those too. [There are of course more complicated examples where the cleanup wasn't a simple single commit, and a conflict resolution would be needed, but my goal is no change to the final state of the files on disk] It sounds like the above proposal would handle at least some of these history edits. |
No description provided.
The text was updated successfully, but these errors were encountered: