re: Be more productive with shell aliases VIEW POST


You could actually shorten your pull and push git commands a bit. Oh My Zsh also has ggl which is an alias for git pull origin $(current_branch). The plugin keeps track of which branch you are on in the current_branch variable. When you are on the master branch the alias would end up being git pull origin master, if you were on a branch named feature it would be git pull origin feature. The same rules apply to the ggp alias, defined as git push origin $(current_branch).


That's how ggpush and ggpull work too, but I didn't know about the shorter-named functions! Guess I really need to read through all the functions in that plugin, heh. Thanks!

Code of Conduct Report abuse