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

Fixes #1178: adds '--no-ff --no-commit' option to merge #1621

Merged
merged 1 commit into from Nov 17, 2021

Conversation

dimaulupov
Copy link
Contributor


Description

This change just adds '--no-ff --no-commit' option to merge command.
I personally use it all the time to review the code.

Merge without commit, see problems, reset.

Issue for that #1178 was created some time ago, but it seems it did not get any traction.

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

@eamodio
Copy link
Member

eamodio commented Nov 16, 2021

@dimaulupov I asked on the issue, but I think I'd rather see an option here just for --no-commit. Does the --no-ff have any effect with --no-commit?

@eamodio eamodio self-assigned this Nov 16, 2021
@eamodio eamodio added this to the Soon™ milestone Nov 16, 2021
@dimaulupov
Copy link
Contributor Author

@eamodio sorry for nor replying earlier.

Main reason why --no-commit is not enough is that it does not work for branches that can be fast-forwarded.

I am reviewing other branches and merging them into main.

Easiest way (for me at least) to review the code and see changes in overall is to use highlighting features for changes in vscode. It is possible to start the code, see what it does, etc. Quite often branches are not ready and I often reset my main branch after looking at the changes.

It means I need to just apply changes from other branch, but not actually commit.
If branch is diverged a lot, --no-commit works great. It just applies everything, stages and stops.
But if branch can be fast-forwarded, --no-commit does nothing. Merge just adds all the other branches commits into my branch. So I can't easily see what changed and also unable to reset (with just one command).
So you need both --no-commit and --no-ff to cover both scenarios.

@eamodio
Copy link
Member

eamodio commented Nov 16, 2021

@dimaulupov Thank you for the extra information -- very helpful!

@eamodio eamodio merged commit c5df559 into gitkraken:main Nov 17, 2021
@eamodio
Copy link
Member

eamodio commented Nov 17, 2021

Thank you so much for your contribution!

Thank you!

@eamodio eamodio modified the milestones: Soon™, Shipped Nov 19, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants