- 
        Couldn't load subscription status. 
- Fork 7.3k
Set default answer to "no" for "deleting branch after merge" question #1962
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
Set default answer to "no" for "deleting branch after merge" question #1962
Conversation
Signed-off-by: Ricardo Seriani <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this and feel that it does mirror the .com experience more closely (where you have to exert a little more effort to delete a merged branch)
| Can this be a setting instead? I much prefer having the default to be yes | 
| @shawnkoh In general, we tend to default to what we think is the safest choice. If an accidental keystroke could lead to a branch being deleted, we'd rather that the accidental keystroke does nothing. Currently, we want to avoid adding to many configuration options, but we will consider this in the future if it becomes a popular request. If you prefer to always delete branches after merges on the repository level, you can go to repo settings in GitHub web (if you are a repo admin) and choose the option to auto-delete branches after PR merges. | 
| 
 Good point. thank you for taking the time to respond. i'll explore finding an alternative to automatically delete the local branch upon merge. | 
| Note: the docs/manual needs updating: https://cli.github.com/manual/gh_pr_merge 
 
 ^ This is no longer true. The default is now  I would have sent a PR but I couldn't find the repo that contains the manual? Maybe it would be a good idea to open source those if you haven't already? | 
| @OliverJAsh Our docs are generated from the source code: Lines 57 to 60 in f53efb3 
 However, I do not think that the docs are outdated here. They refer to the default for the  This PR flipped the default for the interactive prompt to guard against accidentally pressing Enter, resulting in a destructive operation. | 
| Ahh okay, thanks for clarifying. I guess my next question is whether the default should be the same for  | 
| @OliverJAsh That's a good question to make. You are welcome to open an issue about it and reference #899 (comment) 🙇 | 
Closes #1957
Signed-off-by: Ricardo Seriani [email protected]