git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Potapov <dpotapov@gmail.com>
To: Tim Harper <timcharper@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: How has learning the advanced features of git helped you to write software more effectively?
Date: Thu, 23 Jul 2009 01:59:07 +0400	[thread overview]
Message-ID: <20090722215906.GB25324@dpotapov.dyndns.org> (raw)
In-Reply-To: <e1a5e9a00907221421m27f0f836t98d361dffc7bd87f@mail.gmail.com>

On Wed, Jul 22, 2009 at 03:21:26PM -0600, Tim Harper wrote:
> 
> Out of the shoot, you get a lot of value learning the basic features
> of git: easy branching, merging, etc.  How has learning the advanced
> features of git (bisect, rebase, rebase -i, add -p, etc.) helped you
> to write software more effectively?

Now I see what features you consider as "advanced", so I will try to
answer your question more directly this time:

- git bisect was useful for the obvious reason: it has saved time and
  efforts in finding some regression. It is especially true if the bug
  is a tricky one.

- I use 'rebase -i' to clean up patches before publishing. When I work
  on some feature, I can focus on it without being distracted some minor
  unimportant details, but then I can take a second look at what I did
  and clean up things a bit before publishing. So, my code is cleaner
  and easy to review.

- 'add -p' is about splitting changes to meaningful patches. Sometimes,
  when you are working on something, you may want to correct another
  minor problem that you came across, but commiting two completely different
  changes as a single patch is not a very good idea.

- 'rebase' can be *sometimes* useful, but it is not something that I
  will recommend to do often and without thinking. Some people really
  like to have linear story, so they tend to abuse this command, but
  'rebase' is re-writing of history, and it means that the original
  history gets lost. OTOH, if you use git-svn, then you do not have much
  choice but to keep it linear....

In any case, I believe that the basic ideas about Git should be learned
first and some advanced features can be learned later when one needs them.


Dmitry

  parent reply	other threads:[~2009-07-22 21:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22 21:21 How has learning the advanced features of git helped you to write software more effectively? Tim Harper
2009-07-22 21:55 ` Junio C Hamano
2009-07-22 21:59 ` Dmitry Potapov [this message]
2009-07-22 22:32 ` Daniel Barkalow

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=20090722215906.GB25324@dpotapov.dyndns.org \
    --to=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=timcharper@gmail.com \
    /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).