Dear Coq devs,
In case it'd be useful during some of your workflows, FYI I've just released two simple scripts
git pr and
git prw, which can be integrated in Git just like aliases.
The aim is just:
git pr 420 upstream:
upstreamand overwrite the "read-only" local branch named
git prw 420 upstream:
pr/420does not exist already (one can pass
-fto always overwrite),
(see this post for details)
Interesting @Erik Martin-Dorel , what is the difference with
hub checkout PRURL? and variants ?
Hi @Emilio Jesús Gallego Arias, two main differences:
git-pris a simple Bash script that one can put in one's PATH;
hub checkoutand e.g. the alternative from
tj/git-extrasonly implement the fetch of a read-only branch − very useful for reviewing indeed, but in practice one sometimes wants to (force)push somebody else's PR (either because the PR author is not responsive, or for pair-programming): this is only feasible by adding a remote manually, or using the feature from
Great! I have personally been using
gh pr, which is the official GitHub command line and has the same limitations as
hub (very good for checking out a PR, but doesn't handle pushing back). But I noticed that I can still push without adding a remote, by passing the remote URL in the list of
git push arguments.
Note for Emacs users: With the Magit Forge plugin, you can also easily checkout a pull request. It also adds a new remote so that you can push. https://magit.vc/manual/forge/Branching.html#Branching
Hi @Lasse, as a Magit user (but not yet a Forge user :), thanks for sharing this tip!
Last updated: Oct 16 2021 at 07:02 UTC