Skip to content

Instantly share code, notes, and snippets.

@bbrodriges
Last active December 17, 2015 08:49
Show Gist options
  • Save bbrodriges/5583113 to your computer and use it in GitHub Desktop.
Save bbrodriges/5583113 to your computer and use it in GitHub Desktop.
Useful git shortcut
branch_name=$(git symbolic-ref -q HEAD)
branch_name=${branch_name##refs/heads/}
branch_name=${branch_name:-HEAD}
function gitacpp() { git add -A; git commit -m "$1" $2; git pull origin $branch_name; git push origin $branch_name; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment