-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Allow rebasing to first commit #2453
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
Allow rebasing to first commit #2453
Conversation
Uffizzi Preview Environment
|
It's not so much the total number of commits that matters here, it's just whether we are on the first one. (This includes the other condition.) This allows us to get rid of the condition in rebase.go.
Pass --root instead of a sha when we want to rebase down to the initial commit.
|
I just realized I forgot to make the same change for the commands "Squash all fixups above" and "Amend commit with staged changes". It should be easy to support it for those in the same way; give me a few minutes to add this. :-) |
|
@stefanhaller serendipitous timing on that comment, I was just about to hit merge haha. I'll hold off |
This includes amending changes into a given commit, since that's implemented in terms of the former.
681dc8a to
c5cd217
Compare
|
I added that commit, and rebased on master. |
| Content(Contains("Are you sure you want to create a fixup! commit for commit")). | ||
| Confirm() | ||
| }). | ||
| NavigateToListItem(Contains("commit 01")). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unfortunate that we have to navigate down again here; it would be nice if the selection was adjusted down by one after creating a fixup commit, so that you stay on the same commit. I guess that's an independent fix though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, moving the cursor down by one would be good.
|
Thanks for making this! I appreciate the extensive test coverage |
Make it possible to do interactive rebase operations (edit, reword, etc) on the initial commit of a repo.
Fixes #2381.
go run scripts/cheatsheet/main.go generate)docs/Config.md) have been updated if necessary