Created
September 13, 2013 06:40
-
-
Save iamntz/6547351 to your computer and use it in GitHub Desktop.
Usage: add these lines in your `~/.gitconfig` file (in Windows you can press win+r and type %home% to open the right folder). The, in terminal, you could do `git lol` to see a nicely formatted log or `git zip` to quickly zip current branch and so on.
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
[alias] | |
lol = log --graph --pretty=format:'%Cred%h%Creset%C(yellow)%d%Creset %s %C(black bold)- %an %Cgreen(%cr)%Creset' --abbrev-commit --date=relative | |
hash = rev-parse --short HEAD | |
curbranch = "!git branch | grep \"*\" | sed \"s/* //\"" | |
zip = "!HASH=$(git hash) && BRANCH=$(git curbranch) && git archive --format zip --output $BRANCH-$HASH.zip master" | |
pu = "!git push origin $(git curbranch) --progress" ; TODO: add a parameter to allow stuff like `git pu custom-remote-name` | |
pp = "!git pull origin $(git curbranch)" | |
la = "!git config -l | grep alias | cut -c 7-" ; just in case you forget an alias ;) | |
ignore = "!([ ! -e .gitignore ] && touch .gitignore) | echo $1 >>.gitignore" ; quickly ignore a file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment