Add 'ghpc' helper script

This commit is contained in:
Scott Lahteine
2019-05-27 20:57:29 -05:00
parent 32afe1d102
commit 6d92a0a33b
2 changed files with 73 additions and 4 deletions

View File

@ -18,7 +18,7 @@ The following scripts can be used on any system with a GNU environment to speed
File|Description
----|-----------
mfadd [user]|Add and Fetch Remote - Add another Github user's fork of Marlin as a remote, then fetch it. Optionally, check out one of their branches.
mfadd [user]|Add and Fetch Remote - Add and fetch another user's Marlin fork. Optionally, check out one of their branches.
mfinit|Init Working Copy - Create a remote named '`upstream`' (for use by the other scripts) pointing to the '`MarlinFirmware`' fork. This only needs to be used once. Newer versions of Github Desktop may create `upstream` on your behalf.
#### Branches
@ -41,14 +41,15 @@ mfqp|Quick Patch - Commit all current changes as "patch", then do `mfrb`, follow
File|Description
----|-----------
mfdoc|Build the documentation and preview it locally.
mfpub|Build the documentation and publish it to marlinfw.org via Github.
mfdoc|Build the documentation with Jekyll and preview it locally.
mfpub|Build and publish the documentation to marlinfw.org.
#### Utilities
File|Description
----|-----------
ghtp -[h/s]|Set the protocol to use for all remotes. -h for HTTPS, -s for SSL.
ghpc [-f]|Push current branch to 'origin' or to the remote indicated by the error.
mfinfo|This utility script is used by the other scripts to get:<br/>- The upstream project ('`MarlinFirmware`')<br/>- the '`origin`' project (i.e., your Github username),<br/>- the repository name ('`Marlin`'),<br/>- the PR target branch ('`bugfix-1.1.x`'), and<br/>- the current branch (or the first command-line argument).<br/><br/>By itself, `mfinfo` simply prints these values to the console.
mfclean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Prune your merged and remotely-deleted branches.
@ -56,4 +57,4 @@ mfclean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Prune your merged and remotely-deleted bra
### Examples
Coming Soon!
For a demonstration of these scripts see the video [Marlin Live - May 9 2019](https://youtu.be/rwT4G0uVTIY). There is also an old write-up at [#3193](https://github.com/MarlinFirmware/Marlin/issues/3193).