Skip to content

Instantly share code, notes, and snippets.

@lshearer
Last active August 29, 2015 14:04
Show Gist options
  • Save lshearer/ebb8a55a7406637cb523 to your computer and use it in GitHub Desktop.
Save lshearer/ebb8a55a7406637cb523 to your computer and use it in GitHub Desktop.
git-mm
#!/bin/sh
# v0.1.0
# Copyright 2014, Lyle Shearer
# MIT License
# https://gist.github.com/lshearer/ebb8a55a7406637cb523
#
# Using http://blog.santosvelasco.com/2012/06/14/extending-git-add-a-custom-command/ as a guideline
#
# Convenience method to fetch and then merge in origin/master to current HEAD
# Usage:
# > git mm
#
# Installation:
# Copy to `C:\Program Files (x86)\Git\libexec\git-core` (Windows) or similar. File must have no extension.
git fetch && git merge origin/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment