Tips for Intermediate Git Users
andyjeffries.co.uk
andyjeffries.co.uk
$ git log --grep="Something in the message"
$ git log -S "TODO: Check for admin status"
It's a mixture of basic and interesting tips, I'd much rather the interesting tips be separated out; feels like the author was padding the article out for the sake of a title.
Still, tip 12 was new to me, so I'd be interested in seeing a better use case.
"git gc tries very hard to be safe about the garbage it collects. In particular, it will keep not only objects referenced by your current set of branches and tags, but also objects referenced by the index, remote-tracking branches, refs saved by git filter-branch in refs/original/, or reflogs (which may reference commits in branches that were later amended or rewound)." -- http://www.kernel.org/pub/software/scm/git/docs/git-gc.html
Does anyone know how github will handle tags pointing to a blob instead of a tree?
EDIT: On second thought, it probably makes more sense to have a "prebuilt" branch that has the actual tree of my release package. That would also let git share objects that are common to the source branch: README, manpages, etc.
Good name: Tips for Intermediate Git Users
Git is arguably one of the best pieces of software created in the past decade.
Its learning curve is definitely steep, but it's exactly tips like these which give a perspective of Git's true power.
The core of git is really simple. If you understand objects, hashes, blobs, trees, commits, then you pretty much know the basic vocabulary and you'll be able to learn more as you go.
This is a really good explanation for these basics: http://ftp.newartisans.com/pub/git.from.bottom.up.pdf