gitbutlerapp / gitbutler

The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte
https://gitbutler.com
Other
11.48k stars 467 forks source link

Add an 'allow rebasing' toggle on per-branch basis #4188

Closed krlvi closed 5 days ago

krlvi commented 5 days ago

The app has a project/repo wide setting allow force pushing, which defaults to true. This config is responsible for the following:

In the scenarios above, a subsequent push will need to be a "force push", which may be undesirable in some cases, hence the ability to disable that behavior with the allow force pushing config.

Screenshot 2024-06-26 at 14 02 08

This PR adds the ability to control this behavior on a per-branch basis. For example, if one branch is used for collaborating with another developer, it may be desirable to toggle this off for that specific branch only, while keeping it enabled for other branches (since rebasing offers more flexibility in the workflow).

This can be toggled with the "Allow rebasing" toggle on the branch lane.

Screenshot 2024-06-26 at 14 01 57

The default value will follow the value of the project/repo-wide allow force pushing (which is enabled by default).