Skip to content

Instantly share code, notes, and snippets.

@birkirb
Created April 7, 2010 08:26
Show Gist options
  • Save birkirb/358659 to your computer and use it in GitHub Desktop.
Save birkirb/358659 to your computer and use it in GitHub Desktop.
#!/bin/bash
# = USAGE
# git ff
#
# = INSTALL
# gist 358659 > git-ff &&
# chmod 755 git-ff &&
# mv git-ff /usr/local/bin/git-ff
function git_branch_name {
ref=$(git symbolic-ref HEAD 2> /dev/null)
echo "${ref#refs/heads/}"
}
git merge origin/$(git_branch_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment