Skip to content
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

Git helper shell scripts for MarlinFirmware #3567

Merged
merged 1 commit into from
Apr 19, 2016

Conversation

thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Apr 19, 2016

Do PR submissions for Marlin directly from your BASH command line with these helpful scripts specifically tailored to make your Marlin workflow go more smoothly.

mfinfo [branch]

Get the following helpful Marlin-Github info about the repo of your working directory:

  • Remote (upstream) Org name (MarlinFirmware)
  • Remote (origin) Org name (your Github username)
  • Repo Name (Marlin or MarlinDev)
  • Marlin Target branch (RCBugFix or dev)
  • Branch Name (the current branch or the one that was passed)
Example:
[/Projects/Firmware/Marlin] $ mfinfo
MarlinFirmware thinkyhead Marlin RCBugFix rc_slow_buttons

mfup [branch]

Fetch and merge upstream changes, optionally with a branch

Example:
[/Projects/Firmware/Marlin] $ mfup rc_doc_tweaks
Fetching upstream (MarlinFirmware)...

Bringing RCBugFix up to date...
Branch RCBugFix set up to track remote branch RCBugFix from origin.
Everything up-to-date
Already up-to-date.
Everything up-to-date

Rebasing rc_doc_tweaks on RCBugFix...
Switched to branch 'rc_doc_tweaks'
Your branch is up-to-date with 'origin/rc_doc_tweaks'.
First, rewinding head to replay your work on top of it...
Applying: Move STRINGIFY to macros.h, use in language.h
Applying: Drop DISABLE_M(IN|AX)_ENDSTOPS, replace with individual endstop flags
Applying: Simplify configuration of Z2 endstops
Applying: Account for Z_DUAL_ENDSTOPS in sanity checking of endstops
Applying: Adjust SanityCheck messages
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.

Switched to branch 'i3_millie_RCBugFix'
Your branch is up-to-date with 'origin/i3_millie_RCBugFix'.

mfpr [branch]

Start a PR of the current branch against RCBugFix or dev. Pushes your branch to origin if you forgot. This script may need to be adjusted to your particular environment. In particular, if you don't have a gnome-open, xdg-open, or open command to open a URL in a browser, you will need to use your system's equivalent.

Example:
[/Projects/Firmware/Marlin] $ mfpr
Opening a New PR Form...
(opens the "New PR" page in the browser, set to the current branch)

mfprune

Prune all your merged branches and any branches whose remotes are gone.
A great way to clean up your branches after messing around a lot.

Example:
[/Projects/Firmware/Marlin] $ mfprune
Pruning Merged Branches...
Deleted branch rc_epatel_mesh_fixes (was 14afe1a).
Deleted branch rc_fix_numeric_filenames (was f423716).
Deleted branch rc_general_clean (was 5d8036e).
Deleted branch rc_keepalive_less (was cd4c3e9).

Pruning Remotely-deleted Branches...

mfrb

Start an interactive rebase of the current branch against RCBugFix or dev.

Example:
[/Projects/Firmware/Marlin] $ mfrb

@thinkyhead thinkyhead added the T: Development Makefiles, PlatformIO, Python scripts, etc. label Apr 19, 2016
@thinkyhead thinkyhead merged commit 3083ee4 into MarlinFirmware:RCBugFix Apr 19, 2016
@thinkyhead thinkyhead deleted the rc_mf_bash_scripts branch April 19, 2016 04:41
@thinkyhead thinkyhead mentioned this pull request Jul 8, 2016
@jbrazio jbrazio modified the milestone: 1.1.0 Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Development Makefiles, PlatformIO, Python scripts, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants