I've been doing `git push -u origin HEAD` and then using my mouse to click on the "go here to create a PR" link that gets printed, which isn't too bad. Takes you right to the page where you can review the changeset before opening the PR. If I'm not actually ready to open a PR by the time I push upstream, I just open a draft instead.
Yes, that's what I do as well. I also have the old hub frontend for git installed. The idea is that you simply alias git to hub and then you get a few extra commands.
My favorite is "git browse", which opens a browser for the current repo & branch. There are a few other commands that are probably useful but that I don't really do much with.
Do you run this command frequently enough to do an alias? I feel like it'd be better to just have the muscle memory of typing the actual command instead
I used to have a lot of git aliases but then I became dependent on those and forgot the actual git commands that were lying underneath. So whenever I went to a new system I'd have to port my dotfiles or look up the git docs for what the commands were. If a colleague asked me "how do I do X" I had no clue and had to look in my bashrc. Nowadays I only add them if I do it many many times per day. Like "git commit -a -m" for example. I try to keep things as close to stock as I can
This type of alias seems on the fence for me, if was like 10x a day I'd definitely be on board but a few times a day is a gray area
Yeah this is huge— I used to use `hub` for this one thing as well. The alternative is even worse if you cloned from a repo you don't have push access to, so your first step is going to the web UI, creating the fork, switching the remote on your clone, and then _finally_ pushing and creating the PR.
`gh pr create --web`
Saves me having to push my current branch, navigate to the repo page, hit the "create PR" button, etc.