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

[Feature Request] Prompt to update remote branches #84

Open
calebdw opened this issue Sep 7, 2022 · 3 comments
Open

[Feature Request] Prompt to update remote branches #84

calebdw opened this issue Sep 7, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@calebdw
Copy link

calebdw commented Sep 7, 2022

I have an extra remote besides origin which has stale develop/master branches and generates the following message:

Remote <remote> is not up to date with 2 local branch(es):
  - develop
  - master

This will likely impair detection of merged branches for remote <remote>.
Please consider getting it back in sync by running
  $ git push <remote> develop
  $ git push <remote> master

and then invoking git-delete-merged-branches, again.

Rather than having to exit the tool, sync the branches, and then rerun the tool, can you please just have the tool prompt to update these branches?

Thanks!

@hartwork hartwork added the enhancement New feature or request label Sep 7, 2022
@hartwork
Copy link
Owner

hartwork commented Sep 7, 2022

Hi @calebdw the situation is a bit tricky because (1) pushing things is a bit far from deleting branches and (2) because if we prompt for things --yes would be expected to acknowledge that prompt as well. So while I understand that adding this feature would ease things for some users (including myself) I'm not yet sure if it needs to be part of the tool and if so how to integrate it in a sane way. Maybe we need git-sync-fork for that or something 🤷

@calebdw
Copy link
Author

calebdw commented Sep 8, 2022

Thanks for the response @hartwork! You bought up some interesting points I had not thought about...

How about this idea though:
Syncing remotes could be designated a 'risky' feature and --yes could be made to answer No by default to risky features. However, if desired, --yes could be made to answer Y either by another switch (such as --auto-sync-remotes) or by another switch (such as --yes-risky).

@hartwork
Copy link
Owner

hartwork commented Sep 8, 2022

Hi @calebdw maybe something like the --auto-sync-remotes you mention could indeed work: like printing the message and hinting about that argument and keeping it out of --yes altogether because then there is no prompt and hence nothing to decide upon.
I will need to digest on it a bit more, and also find a name that avoids "sync". Maybe --push-targets? --push-required-targets? --push-to-remotes? Ideally I'd want the name to communicate that it's about adding new content to the remotes (rather than the usual deletion push that's also a push in some way) and that it's not needed for purely local operation without remotes 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants