Skip to content

Instantly share code, notes, and snippets.

@mario21ic
Last active March 17, 2016 14:49
Show Gist options
  • Select an option

  • Save mario21ic/14aa58a1787710ad938d to your computer and use it in GitHub Desktop.

Select an option

Save mario21ic/14aa58a1787710ad938d to your computer and use it in GitHub Desktop.
Script to git pull/push into current branch
function current_branch() {
git branch|grep "\*"|awk '{print $2}'
}
function gpull() {
git pull origin $(current_branch)
}
function gpush() {
git push origin $(current_branch)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment