chriswalz / bit

Bit is a modern Git CLI
Apache License 2.0
6.06k stars 106 forks source link

Feature request: `bit rebase --squash` #26

Open jyn514 opened 4 years ago

jyn514 commented 4 years ago

Like git rebase -i, but the prompt it opens up has all but the first commit set to squash instead of pick 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.

chriswalz commented 4 years ago

@jyn514 There's git merge --squash that I believe effectively does the same thing

jyn514 commented 4 years ago

@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.

chriswalz commented 4 years ago

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.

jyn514 commented 4 years ago

bit rebase --squash sounds good to me :)