Re:A better git log
by ngkabra on Tuesday June 19, 2012 @02:53AM
(#4130573)
I find myself using these aliases regularly:
There are a lot more at this stackoverflow thread: http://superuser.com/questions/169695/what-are-your-favorite...
[ Parent
| on HN ]
`git df' sounds like it should tell me how much space is free on all remote mirrors of the repo.
Is there a `git du' ?
Yes, there is: du .git
Is there anyway to get the short git status but still get the output that says "Your branch is ahead of 'origin/master' by 6 commits."
status -sb
Awesome thanks!
From my .gitconfig:
# --- LOGS ---
ll = "log --pretty=oneline --abbrev-commit"
lg = log --pretty=oneline --abbrev-commit --graph --decorate --date=relative
lgt = log --graph --pretty=format:'%Cred%h%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
lgtt = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
I almost never user "git lgt" or "git lgtt." Instead I mostly use "git ll", and sometimes "git lg", though if you're doing a lot of merging around, the graph can get a bit convoluted.Is there a way to make the filenames in a 'git diff' stand out/coloured? I always have trouble figuring out where one file's diff ends and the next one begins.
git diff --color
Or modify ~.gitconfig: [color]
diff = auto
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green boldMy favorite: git diff --color-words=.