Created
November 24, 2011 10:46
-
-
Save danielestevez/1391076 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
Git pull/push HEAD
pushes a whole untracked branch to remote but this alias ps/pl pushes changes to checked out branches existing in remote, if i'm not wrong