Warn if branch not published
Describe the feature or problem you'd like to solve
If you try to run glab mr create on a branch that only exists locally, a merge request is created from a non existent branch with no changes.
Propose a Solution
Option to warn or block glab mr create if the branch doesn't exist on the remove.
Hi @penx
I guess we could show some kind of info text that nothing is pushed to the remote and it's an empty MR, but I don't think this is really needed since it's a completely valid thing to do in GitLab.
And if you want to push your current branch you can use the --push flag.
A warning would be great, for me due to me wrongly thinking I'd pushed a branch and then distributing the MR link with my team only to later be told the MR is blank 😄 (I've done this about 4 times over the past couple weeks! I'm used to hub which I think prevents a PR being created)
Yes I could start using --push by default instead...
Thanks for glab 🙂
You can use an alias for this. I have one called mrc that does all the stuff I need for MR
You can do it like glab alias set mrc "mr create -a=@me --remove-source-branch --push
This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.