8000 replace the `push-new-branches` option with `share-new-branches` · Issue #3912 · git-town/git-town · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

replace the push-new-branches option with share-new-branches #3912

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

Closed
kevgo opened this issue Aug 30, 2024 · 5 comments · Fixed by #4806 or #4810
Closed

replace the push-new-branches option with share-new-branches #3912

kevgo opened this issue Aug 30, 2024 · 5 comments · Fixed by #4806 or #4810

Comments

@kevgo
Copy link
Contributor
kevgo commented Aug 30, 2024

This flag is a leftover from the early days when Git Town was a prototype and we tried out random things that came to mind to get a feel for it. Today this config option costs more (in terms of complexity and learning curve) than it benefits.

Is there a good reason for this setting to ever be true? What might make sense for new branches is creating a draft proposal to signal that one is working on this. How is just pushing an empty branch useful here?

If somebody really needs a new branch to be pushed, they can call git sync at any time.

Git Town is not better off with this option existing. It might be better off without it.

If we keep this, let's generalize it to let the user choose what to do with new branches:

  • do nothing (default)
  • push them to origin
  • create a draft proposal
    • for syncing the lineage as part of proposals as lineage database #2745
    • to write down metadata like which issue this branch solves
    • to communicate to others that you work on this issue
    • to formalize the goal for this branch, the implementation plan, and acceptance criteria
@kevgo kevgo added this to the 16.0 milestone Aug 30, 2024
@kevgo kevgo changed the title deprecate the push-new-branches option replace the push-new-branches option with share-new-branches Aug 30, 2024
@kevgo kevgo removed this from the 16.0 milestone Aug 30, 2024
@kevgo
Copy link
Contributor Author
kevgo commented Sep 1, 2024

Initially allow only the push option to match the existing behavior and keep the breaking change small. Then add additional options like propose in subsequent minor releases.

@kevgo
Copy link
Contributor Author
kevgo commented Sep 3, 2024

This doesn't need to be breaking if #3866 provides an automatic upgrade for the config file.

@kevgo kevgo closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2024
@kevgo kevgo reopened this Apr 26, 2025
@kevgo
Copy link
Contributor Author
kevgo commented Apr 26, 2025

This option can be made useful with these possible values:

  • none: new branches remain local
  • push: new branches get pushed to the dev remote (current behavior)
  • propose: new branches automatically get proposed, ideally in draft mode

@kevgo
Copy link
Contributor Author
kevgo commented Apr 26, 2025

Avoid making this a breaking change:

  • leave the old setting in the config file
  • add the new setting to the config file
  • translate the old setting to the new setting when loading the configuration
  • when both are present: new setting overrides the old setting
  • internal config data only contains the new setting

@kevgo
Copy link
Contributor Author
kevgo commented Apr 26, 2025

We should either remove this option or add the "propose" variant. Leaving it as-is feels half-baked and not useful enough.

tmeijn pushed a commit to tmeijn/dotfiles that referenced this issue May 10, 2025
⚠️ **CAUTION: this is a major update, indicating a breaking change!** ⚠️

This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [git-town/git-town](https://github.com/git-town/git-town) | major | `v18.3.2` -> `v20.1.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>git-town/git-town (git-town/git-town)</summary>

### [`v20.1.0`](https://github.com/git-town/git-town/releases/tag/v20.1.0)

[Compare Source](git-town/git-town@v20.0.0...v20.1.0)

##### New Features

-   `git town compress` now has a `--no-verify` flag that disables Git's pre-commit hook ([#&#8203;4843](git-town/git-town#4843)).

##### Bug Fixes

-   `git town compress` now enforces that the branch to compress is in sync with its parent branch ([#&#8203;4845](git-town/git-town#4845)).
-   `git town sync` now doesn't remove commits of branches with deleted tracking branch if they don't have descendents ([#&#8203;4872](git-town/git-town#4872)).
-   Git Town no longer overrides the language of executed Git commands to US-English ([#&#8203;4861](git-town/git-town#4861)).

##### Contributors

Shoutout to [@&#8203;AmitJoki](https://github.com/AmitJoki), [@&#8203;fcurella](https://github.com/fcurella), [@&#8203;haltcase](https://github.com/haltcase), [@&#8203;kevgo](https://github.com/kevgo), [@&#8203;lvlcn-t](https://github.com/lvlcn-t), [@&#8203;mw00120](https://github.com/mw00120), [@&#8203;niklastreml](https://github.com/niklastreml), [@&#8203;stephenwade](https://github.com/stephenwade) for contributing code, feedback, and ideas to 34 shipped MRs and 6 resolved issues!

### [`v20.0.0`](https://github.com/git-town/git-town/releases/tag/v20.0.0)

[Compare Source](git-town/git-town@v19.0.0...v20.0.0)

Git Town 2000! 🎉

##### BREAKING CHANGES

-   The `push-new-branches` configuration option is now called `share-new-branches` and allows additional ways of sharing freshly created branches ([#&#8203;3912](git-town/git-town#3912)):
    -   `no`: keep new branches local (default)
    -   `push`: push new branches to the [development remote](https://www.git-town.com/preferences/dev-remote.html)
    -   `propose`: automatically create proposals for new branches. This helps being maximally transparent with progress on each item worked on.
-   `git town propose` now always syncs the proposed branch, but always in [detached mode](https://www.git-town.com/commands/sync.html#-d--detached) mode ([#&#8203;4772](git-town/git-town#4772), [#&#8203;4781](git-town/git-town#4781)).
-   `git town propose` now longer has the `--detached` flag because it now always syncs in detached mode ([#&#8203;4775](git-town/git-town#4775)).

##### New Features

-   `git town sync` now correcly syncs branches whose commits got amended or rebased ([#&#8203;4586](git-town/git-town#4586)).
-   You can now propose all branches in a stack with `git town propose --stack` ([#&#8203;3840](git-town/git-town#3840)).
-   `git town propose` now un-parks parked branches when proposing them ([#&#8203;4780](git-town/git-town#4780)).
-   The [setup assistant](https://www.git-town.com/configuration.html) no longer asks for data already provided by the [Git Town configuration file](https://www.git-town.com/configuration-file.html) ([#&#8203;4710](git-town/git-town#4710)).
-   The setup assistant now offers to store forge API tokens globally for all repos on your machine ([#&#8203;4112](git-town/git-town#4112)).
-   [git town status reset](https://www.git-town.com/commands/status-reset.html) now indicates whether the runstate file existed ([#&#8203;4814](git-town/git-town#4814)).
-   [git town status reset](https://www.git-town.com/commands/status-reset.html) now supports the `--verbose` flag ([#&#8203;4813](git-town/git-town#4813)).

##### Bug Fixes

-   Git Town now correctly resolves `includeIf` directives in Git configuration ([#&#8203;4107](git-town/git-town#4107)).
-   `git town prepend --beam` now works correctly with prototype branches ([#&#8203;4768](git-town/git-town#4768)).
-   Git Town now loads the forge API token with the same precendence as other configuration data ([#&#8203;7428](git-town/git-town#4728)).
-   [git town undo](https://www.git-town.com/commands/undo.html) now correctly undoes situations where only the local part of a branch got renamed ([#&#8203;4794](git-town/git-town#4794)).
-   Git Town now works even if Git's `color.ui` setting is `always` ([#&#8203;4840](git-town/git-town#4840)).
-   The setup assistant now only updates the stored access token of the forge that is actually being used ([#&#8203;4819](git-town/git-town#4819)).
-   [git town status reset](https://www.git-town.com/commands/status-reset.html) can now be run from a subdirectory ([#&#8203;4812](git-town/git-town#4812)).

##### Contributors

Git Town 2000 is a big release. Shoutout to [@&#8203;AmitJoki](https://github.com/AmitJoki), [@&#8203;Ydot19](https://github.com/Ydot19), [@&#8203;ahgraber](https://github.com/ahgraber), [@&#8203;davidolrik](https://github.com/davidolrik), [@&#8203;erik-rw](https://github.com/erik-rw), [@&#8203;haltcase](https://github.com/haltcase), [@&#8203;jmyers-figma](https://github.com/jmyers-figma), [@&#8203;judec-ps](https://github.com/judec-ps), [@&#8203;kevgo](https://github.com/kevgo), [@&#8203;lvlcn-t](https://github.com/lvlcn-t), [@&#8203;nekitk](https://github.com/nekitk), [@&#8203;niklastreml](https://github.com/niklastreml), [@&#8203;pradeepmurugesan](https://github.com/pradeepmurugesan), [@&#8203;ruudk](https://github.com/ruudk), [@&#8203;stephenwade](https://github.com/stephenwade), [@&#8203;terheyden](https://github.com/terheyden), [@&#8203;tharun208](https://github.com/tharun208) for contributing code, feedback, and ideas to 124 shipped MRs and 17 resolved issues!

### [`v19.0.0`](https://github.com/git-town/git-town/releases/tag/v19.0.0)

[Compare Source](git-town/git-town@v18.3.2...v19.0.0)

##### BREAKING CHANGES

-   The commands `new-pull-request` and `rename-branch` are being sunset after being deprecated for a long time. Their modern replacements are `propose` and `rename` ([#&#8203;4714](git-town/git-town#4714)).
-   The configuration entries `contribution-branches`, `observed-branches`, `parked-branches`, and `prototype-branches` are being sunset. Their functionality is taken over by setting the type for individual branches as well as `contribution-regex`, `observed-regex`, `default-branch-type`, and `new-branch-type` ([#&#8203;4499](git-town/git-town#4499)).

##### New Features

-   `git town append` and `git town hack` now also have a `--beam` flag to move selected commits to the new branch. When enabled, they no longer fetch or sync, which allows you to move commits with the fewest possible distractions ([#&#8203;3338](git-town/git-town#3338)).
-   The "select commits to beam" dialog now displays the SHA of commits in addition to the commit message ([#&#8203;4519](git-town/git-town#4519)).
-   `set-parent` now allows providing the new parent as an optional positional CLI argument ([documentation](https://www.git-town.com/commands/set-parent.html#positional-argument), [#&#8203;4705](git-town/git-town#4705)).
-   The Git Town website now has a [how-to](https://www.git-town.com/how-tos.html) section.

##### Bug Fixes

-   `git town sync --no-push` no longer make the commit order appear out of order ([#&#8203;4696](git-town/git-town#4696)).

##### Contributors

Shoutout to [@&#8203;erik-rw](https://github.com/erik-rw), [@&#8203;kevgo](https://github.com/kevgo), [@&#8203;legeana](https://github.com/legeana), [@&#8203;nekitk](https://github.com/nekitk), [@&#8203;pradeepmurugesan](https://github.com/pradeepmurugesan), [@&#8203;ruudk](https://github.com/ruudk), [@&#8203;stephenwade](https://github.com/stephenwade), [@&#8203;terheyden](https://github.com/terheyden) for contributing code, ideas, and feedback to 33 shipped MRs and 10 resolved issues!

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4xMS4yIiwidXBkYXRlZEluVmVyIjoiNDAuMTEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
0