Skip to content

Instantly share code, notes, and snippets.

@andru255
Forked from frontend-3/gist:360d9f15657139adba00
Last active November 19, 2015 22:38
Show Gist options
  • Select an option

  • Save andru255/85c78ae49fe35a3358cd to your computer and use it in GitHub Desktop.

Select an option

Save andru255/85c78ae49fe35a3358cd 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() {
echo "git pull origin $(current_branch)"
git pull origin $(current_branch)
}
function gpush() {
echo "git push origin $(current_branch):$(current_branch)"
git push origin $(current_branch):$(current_branch)
}
@renaco
Copy link
Copy Markdown

renaco commented Nov 19, 2015

+1

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