git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zenaan Harkness <zen@freedbms.net>
To: git@vger.kernel.org
Subject: sane, stable renames; when a commit should commit twice
Date: Sun, 23 Dec 2007 13:03:10 +1100	[thread overview]
Message-ID: <20071223020310.GA22450@freedbms.net> (raw)

When should a commit, commit twice?

When one or more git mv file renames/ moves are involved.

In such a case the commit ought to be split into two. Perhaps move the
files in the first commit, then make the changes needed to support the
move in the build chain (including changes in the moved files) in the
second commit.

This keeps a clean record of the move, making the move, and the
associated changes (as two commits) a clean cherry.

Does this make sense?

I develop in the java world, and we use packages (directories, and
subdirectories, sub-sub... etc) a lot, and so it is not uncommon in my
10 years development, to decide to reorganise some package/dir every now
and then, and files, and whole dirs, get moved.

I've only been using git for a few weeks, but finding it truly awesome!
A little demanding in the initial learning curve - took me three days of
reading and a little experiementation here and there, before I finally
felt comfortable with rebasing, branching, etc, to effect my work
pattern.

Have used arch/tla, a little bzr, aegis for a couple of years long time
ago, some cvs, and bk for four months or so.

I'm hoping that the above workflow, which has just crystallized for me
in the last two days, makes sense.

zen

-- 
Homepage: www.SoulSound.net -- Free Australia: www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.

             reply	other threads:[~2007-12-23  2:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-23  2:03 Zenaan Harkness [this message]
2007-12-23  2:26 ` sane, stable renames; when a commit should commit twice David Symonds
2007-12-23 16:29   ` Jakub Narebski
2007-12-23  2:50 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071223020310.GA22450@freedbms.net \
    --to=zen@freedbms.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).