Open jyn514 opened 4 years ago
@jyn514 There's git merge --squash
that I believe effectively does the same thing
@chriswalz that's not quite the same thing - git merge --squash branch
takes the changes from branch
and applies them to the index without committing. But that's not at all the same as rebasing, which puts your current state on top of the changes from branch
, keeping the history. Or in other words, merge --squash
squashes the changes from branch
, but rebase -i
squashes the changes in your current branch.
Ah so it's a matter of merge vs. rebasing. It's strange how git provides one but not the other but I guess that's what bit is for 😛.
Some potential commands could be bit rebase --squash
, bit rebase -i --squash
or simply bit squash
as requested.
bit rebase --squash
sounds good to me :)
Like
git rebase -i
, but the prompt it opens up has all but the first commit set tosquash
instead ofpick
by default. Maybe it could have both an interactive and non-interactive mode? By 'interactive' I just mean 'opens the rebase prompt in your editor', like git.