-
Notifications
You must be signed in to change notification settings - Fork 396
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
FR: docs: Git equivalent of git merge --squash <branch>
#5537
Comments
What's the difference with |
The idea of Following Joy's comment, this could also work:
If the first of these commands results in conflicts, then some difference in merge algorithm between You can also run There was also some discussion of allowing something like:
|
I'm also curious why the |
|
IIRC that creates a merge commit instead of a |
Is the repo you ran into it publicly available? I would still like to know why the Lines 85 to 91 in cfe5915
|
Sadly no :c
This sounds like the reason, I remember that during the review I asked to revert some unnecessary changes, which were probably badly resolved merge conflicts. |
I faced a similar issue recently - a long-running feature branch that had several merged from jj new "heads(::trunk() & ::feature-branch)"
jj restore --from feature-branch
jj rebase -d "trunk()" |
Yes, that should universally work. Btw, you can use |
Sorry for the delay, these work:
And
They should be added to the docs as alternatives to I'll try to create a public repo with the issue during the weekend so that we can test against it and hopefully improve
|
Is your feature request related to a problem? Please describe.
The only times I've had to drop down to
git
in the last few weeks has been for squash merges .Describe the solution you'd like
I'd like a way to perform a squash merge directly from
jj
, and the ability/inability to do so to be documented in the docs. Specifically,jj new main && jj squash --from main..feature-branch --to @
doesn't work as it inserts conflicts markers (whengit merge --squash
doesn't).Describe alternatives you've considered
Additional context
I don't like squash merges, but they help clean up the git history when a coworker has merged in the main branch to their feature branch instead of rebasing.
The text was updated successfully, but these errors were encountered: