Skip to content

Instantly share code, notes, and snippets.

@sourcecodemage
Last active April 12, 2021 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sourcecodemage/ef2cc4307b3d8b97dba6c864a30b59dc to your computer and use it in GitHub Desktop.
Save sourcecodemage/ef2cc4307b3d8b97dba6c864a30b59dc to your computer and use it in GitHub Desktop.

Place this in bashrc

function gp() {
if [[ $# -gt 0 ]]; then
  git pull ${1} $(git branch  | cut -d' ' -f2)
else
  git pull origin $(git branch  | cut -d' ' -f2)
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment