git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How has learning the advanced features of git helped you to write software more effectively?

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Jul 22, 2009, 21:59 UTC
Message-ID
<20090722215906.GB25324@dpotapov.dyndns.org>
In-Reply-To
<e1a5e9a00907221421m27f0f836t98d361dffc7bd87f@mail.gmail.com>
On Wed, Jul 22, 2009 at 03:21:26PM -0600, Tim Harper wrote:
Show 5 quoted lines
> 
> 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
Previous: Junio C HamanoNext: Daniel Barkalow
Message 3 of 4 in “Re: How has learning the advanced features of git helped you to write software more effectively?”
  1. Tim HarperJul 22, 2009
  2. Junio C HamanoJul 22, 2009
  3. Dmitry PotapovJul 22, 2009
  4. Daniel BarkalowJul 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.