Skip to content

Instantly share code, notes, and snippets.

@frontend-3
Created July 6, 2015 16:26
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save frontend-3/360d9f15657139adba00 to your computer and use it in GitHub Desktop.
Save frontend-3/360d9f15657139adba00 to your computer and use it in GitHub Desktop.
Bash para git pull y push en branch actual
function current_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
}
function gpull() {
git pull origin $(current_branch)
}
function gpush() {
git push origin $(current_branch)
}
@juanpablocs
Copy link

+1

@lavaldi
Copy link

lavaldi commented Sep 18, 2015

👍

@mario21ic
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment