-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add Merge Style: Fast-Forward Only (--ff-only
)
#24906
Comments
In our organization, we will be very happy with that feature. The My opinion is that the |
I think those two merge strategies would continue to co-exist. The rebase + fast-forward in one click is convenient for projects where that strategy is desired. |
»Rebase then fast-forward« is already the equivalent of git merge --ff-only || git rebase But what is discussed in https://github.com/orgs/community/discussions/4618 is about support of the equivalent of |
If you read the description and replies of that GitHub community issue, it's clear that the OP is talking about "fast-forward only" (they do not want merge commits), and the discussion is about the drawbacks of using rebase-and-merge, which is the currently available merge strategy that avoids merge commits on GitHub. The title is misleading. It becomes clear if you replace "--ff" with "fast-forward" in the title. They may not be aware of the fallback behavior of the
Regardless, I think both |
I would also like to see this added as this is the only blocker preventing me from switching to gitea over gitlab. Gitlab currently uses a lot more RAM which is unfortunate. |
This is one of the top requested features for GitHub. Implementing this would really set Gitea apart. All the reasons why this is extremely useful (like signed commits + linear git history) can be found here https://github.com/orgs/community/discussions/4618 |
To summarize what I've seen so far:
As far as I'm concerned, this means the proposal is accepted. |
Although, on second thought, I do have an implementation question:
Both would need to be added by a proposed PR. |
Great! I've rebased the implementation I mentioned in the initial post here and resolved conflicts and made sure it builds, and submitted it as a draft (#28954). I think the two items you mention are the main changes needed for this, though I could be forgetting something myself. I'll continue discussion on the PR. |
With this option, it is possible to require a linear commit history with the following benefits over the next best option Rebase+fast-forward: the original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier. Closes go-gitea#24906
With this option, it is possible to require a linear commit history with the following benefits over the next best option Rebase+fast-forward: the original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier. Closes go-gitea#24906
With this option, it is possible to require a linear commit history with the following benefits over the next best option Rebase+fast-forward: the original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier. Closes go-gitea#24906
With this option, it is possible to require a linear commit history with the following benefits over the next best option `Rebase+fast-forward`: The original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier. Closes #24906
With this option, it is possible to require a linear commit history with the following benefits over the next best option `Rebase+fast-forward`: The original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier. Closes go-gitea#24906
With this option, it is possible to require a linear commit history with the following benefits over the next best option `Rebase+fast-forward`: The original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier. Closes go-gitea#24906
With this option, it is possible to require a linear commit history with the following benefits over the next best option `Rebase+fast-forward`: The original commits continue existing, with the original signatures continuing to stay valid instead of being rewritten, there is no merge commit, and reverting commits becomes easier. Closes go-gitea#24906
Automatically locked because of our CONTRIBUTING guidelines |
Feature Description
For projects that want to enforce a linear history, supporting fast-forward-only in the PR UI is very helpful. This is a similar request to #20769 except hopefully more narrow and easier to implement and explain. Rebase+fast-forward has a number of drawbacks for some workflows that are solved by fast-forward-only: mainly that commit hashes can never be modified, and also that any GPG signatures on the commits will be preserved. (Personally, if I had
--ff-only
, I would not need the--ff
style merge as in #20769; I could choose the--no-ff
merge when I don't mind a merge commit, or sync and merge--ff-only
if I don't want one.)For other background of why this is useful, here is a discussion about the same request for GitHub PRs: https://github.com/orgs/community/discussions/4618
I have a first attempt at an implementation to get a feel for how it would work, but I wanted to get feedback on the idea first before requesting review of that.
The text was updated successfully, but these errors were encountered: