-
-
Save andru255/85c78ae49fe35a3358cd to your computer and use it in GitHub Desktop.
Bash para git pull y push en branch actual
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1