Skip to content
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

[UX] Can't use "Fixup" in interactive rebase if parent is the first/ "initial commit" #697

Open
ameaninglessname opened this issue Nov 13, 2024 · 1 comment

Comments

@ameaninglessname
Copy link

ameaninglessname commented Nov 13, 2024

I have two commits in the repository, and I want to combine them into one.

When I open up "interactive rebase", "squash" has to be used and has to provide the commit message for the new "first commit".

@ameaninglessname ameaninglessname changed the title [UX] Can't use "Fixup" in interactive rebase if parent is the first/ [UX] Can't use "Fixup" in interactive rebase if parent is the first/ "initial commit" Nov 13, 2024
@ameaninglessname
Copy link
Author

When I have 5 commits, I want to combine the first and the second commit.

When using the built-in interactive rebase, choosing squash or fixup, I got the error :

error: cannot 'squash' without a previous commit

git rebase -i --root solved the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant