Digression on git; how I'll reduce minor commits
- From: Teika Kazura <teika lavabit com>
- To: sawfish-list gnome org
- Subject: Digression on git; how I'll reduce minor commits
- Date: Tue, 27 Oct 2009 17:35:12 +0900 (JST)
Hi. The last push of my branch included a few minor doc commits, but
they can be combined to others, so I should have do so in order to
reduce commits, but I didn't know how to do it. Let me explain how
I'll do better next time.
A commit should be a unit of "good changes". In another words, patches
grouped together by their roles form a commit. My main job now is to
rewrite news.texi, but it's gradual. By nature, all can be squeezed
into a sole commit in the above sense. (But it's good to push from
time to time so that people can read it and see what's going on. A
commit per a week or two is moderate.)
Last time I made many commits, because git doesn't like much
uncommitted changes being around; merge, cherry-pick, etc. I edit my
local branch, but at the same time I play around with upstream and my
other branches. But git-stash can easily clutter things, and I don't
like it. So commits.
I come up with a new recipe:
$ git checkout -b continuos-edit # branch dedicated to continuous edits
$ # write doc. Oh, new arrival.
$ git commit -a # I don't hesitate to commit on this branch,
$ # instead of stash
$ git merge master # what's new?
$ # think, copy edit, ask at ML, copy read ...
$ # when ready to publish
$ git merge master # make sure it's up-to-date
$ git commit -a # now, let's go to outside world!
$ git checkout branch-to-push
$ git diff master..continuos-edit | git apply
$ git commit -a -v
Seems not bad for me. Does anyone know better way?
Thank you for reading. Regards,
Teika (Teika kazura)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]