Replies: 2 comments 2 replies
-
|
I think @joapuiib is right. As a documentation writer and a code contributor to many projects, I would prefer a |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the detailed suggestion — this is very helpful. I agree with your points about maintaining a linear history and avoiding unnecessary commits. The current history has indeed become less tidy compared to earlier stages. I’ll update the repository workflow accordingly:
For existing history, I’ll leave it as-is to avoid rewriting commits, but all future changes will follow this strategy. Appreciate you taking the time to write this up — this will definitely improve the long-term maintainability of the project. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm writting this discussion directly to @jaywhj as the owner and mantainer of this repository.
I'm no Git expert and I know branching strategies are very personal. Nevertherless, I think the current approach can be improved.
Right now, the
masterbranch looks like this.This are the aspects that I think can be improved:
Mantain a linear history: if you go back on the history on the repository, you can see that it is linear and tidier.
Example old history
Don't merge unecessary commits: As you can see in the history, after Feature: Modularize Admonition CSS for easier extensibility #16 or Docs: Update development setup #18 has been merged, all commits in this branch have been merged too, which might be unnecessary.
My proposal
In order to improve the previousle stated aspects, I propose the following strategy.
Require
masterto be linear. In this sense, it is possible to include a Ruleset to enforce a branch is linear.git pull. By default, this create a merge commit. A rebase can be used bygit pull --rebasein order to mantain linear history.Always
merge squashpull requests: This will create a single commit inmasterwith all changes proposed on the working branch and no merge commit will be created.mergeandrebasemerging for PR and only allow themerge squashmethod.Extra: renaming
mastertomainBeta Was this translation helpful? Give feedback.
All reactions