I’ll try to keep this post short, only the most significant discoveries from this week:
git add –patch
This is the biggest revelation I’ve made in quite some time.
What it will do for me is to give me a chance to select “(c)hunks” of modified code inside a file, which I want to add to the coming commit.
If I were more disciplined while programming, that shouldn’t be necessary, but I hack on a new feature, notice a typo in another part of the code, fix the typo and continue hacking.
And then, should I just do a git add <file>
the commit message would either need to be “hacked on feature and fixed typo” (ugly) or… I guess I could omit mentioning the typo fix in the commit message…
But with --patch
I can now split these two unrelated changes into different commits and have a clean commit history. Awesomeness ensues!
business.txt
Just like the proposal a couple of months ago about a freedom.txt (aw crap, I just remembered I haven’t done anything with that yet…) there is now a new idea, more engineered towards businesses, aptly called business.txt, and I find myself liking that idea pretty much.
:wq