Skip to content

Instantly share code, notes, and snippets.

View SiTaggart's full-sized avatar

Simon Taggart SiTaggart

View GitHub Profile
@SiTaggart
SiTaggart / git-ff
Created December 18, 2013 01:15 — forked from daveslutzkin/git-ff
#!/bin/bash
# Attempts to fast-forward the current local branch to its remote tracked branch.
# Safely refuses if there is no remote tracking, or if a fast-forward is not possible.
# @author Paul Annesley
if [ -n "$(git merge --ff-only 2>&1 | grep 'unknown option')" ]; then
echo "Your git doesn't seem to support --ff-only... try git 1.7+"
exit 1
fi