A better git log
coderwall.com
coderwall.com
git config --global color.ui "auto"
Now, this already gives you most of articles info: git log --decorate --graph --oneline [alias]
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
http://blog.kfish.org/2010/04/git-lola.html [alias]
lol = log --graph --decorate --oneline
lola = log --graph --decorate --oneline --allI saw this months ago in a 2010 blog post: http://www.jukie.net/bart/blog/pimping-out-git-log
It's the exact same alias, sans "--date=relative".
The guy from jukie.net also shares his entire .gitconfig, I built mine from it and highly recommend at least taking a peek: http://www.jukie.net/~bart/conf/gitconfig
df = diff --color --color-words --abbrev
st = status -s
l = log --graph --pretty=oneline --abbrev-commig --decorate
There are a lot more at this stackoverflow thread: http://superuser.com/questions/169695/what-are-your-favorite...Is there a `git du' ?
# --- 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. git diff --color
Or modify ~.gitconfig: [color]
diff = auto
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green boldCould you explain this further? I think I'm being thick.
You don't even need magit to get some nice git interaction.
(in ~/.gitconfig under the [alias] section...)
h = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
https://img.skitch.com/20120619-c9xq67ysdbmrasmfgur6raba1d.p...
I'd love to see how stuff like this spreads. I just use git h because the person that gave it to me used that.
Just type in: git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
That seems ... suboptimal.(I see that too, with JS enabled, and if you view source you can see that that was intentional based on the > and <.)
lg50 = "!git log --graph --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-50s \\033[32m%14s\\033[0m \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | less -R"
lg80 = "!git log --graph --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-80s \\033[32m%14s\\033[0m \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{79}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | less -R"
Note: i've been using them for some time, i don't even remember who was the original source...
On an unrelated note, does someone remember how to add code sections? :)
[Which is what I was going to comment, but you beat me to it.]
Why is the last -- needed? This restricts giving other wise optional flags to git log.. Can list last n commits for example.
http://railstips.org/blog/archives/2009/02/02/bedazzle-your-...
Then found this: http://volnitsky.com/project/git-prompt/ and I'm loving it!
If you really want to skip on the awesomeness that is DAS, he has his dotfiles up on github that are chock full of great tidbits: https://github.com/garybernhardt/dotfiles
Knowing that, this doesn't really matter, but "git lg -10" produces no output at all for me.
log --graph --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr) %C(bold blue)<%an>%Creset %C(yellow)%d%Creset' --abbrev-commit --I tried as per pilgrim689's comment, Now everything is fine with --oneline argument.
Thanks.
<short 1-liner explaining change>
<blank line>
<paragraph with commit details>
then `git log --oneline` displays the 1-liners perfectly.
Seriously, boffins. Stop posting this stuff already. Better techniques are nice, but good only if they're revolutionary (like that Light Table editor). We need more new, ground-breaking stuff and less arrangements of Linus's Lego bricks.
I appreciate this tip (and upvoted it) as I hadn't thought of the idea before. Revolutionary? No. Helpful? Absolutely.
Sparse yes, boring I don't think so.
There's the annual calendar of "news" stories pertaining to major holidays, sports events, and political cycles.
If you've lived a few years (or decades) in any particular area, you'll find a recycled set of "places to go, things to do, sights to see" articles.
If you've lived through a few economic cycles, there's a very predictable trend through boom, cusp, bust, downturn, recovery cycles (NB: still in the downturn).
News is cyclic. Not everyone knows everything. Reiterating the basics every so often is necessary.
The challenge isn't not doing it, but getting the balance right.