-
-
Save Magnum97/b8b93c287e57f156fb53f8dc84637dec to your computer and use it in GitHub Desktop.
GIT Configurations: Alias to Push/Pull automatically on working branch, nice git log format #git
This file contains 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
#include this in your .gitconfigure to perform a pull/push origin on the branch you are currently working | |
# avoids mistakes performing 'pull origin master' when you are in stable and so on | |
# | |
[alias] | |
# Pushes/pulls to/from remote branch with corresponding name | |
pl = !git pull origin $(git symbolic-ref HEAD | sed -e 's,.*/\\(.*\\),\\1,') | |
ps = !git push origin $(git symbolic-ref HEAD | sed -e 's,.*/\\(.*\\),\\1,') | |
# nice git log format | |
[format] | |
pretty=format:%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment