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

Re: Question about your git habits

From
JGJeff Garzik <jeff@garzik.org>
Date
Feb 23, 2008, 05:03 UTC
Message-ID
<47BFA938.3050504@garzik.org>
In-Reply-To
<alpine.LNX.1.00.0802222249480.19024@iabervon.org>
Daniel Barkalow wrote:
Show 16 quoted lines
> I find that the sequence of changes I make is pretty much unrelated to the 
> sequence of changes that end up in the project's history, because my 
> changes as I make them involve writing a lot of stubs (so I can build) and 
> then filling them out. It's beneficial to have version control on this so 
> that, if I screw up filling out a stub, I can get back to where I was.
> 
> Having made a complete series, I then generate a new series of commits, 
> each of which does one thing, without any bugs that I've resolved, such 
> that the net result is the end of the messy history, except with any 
> debugging or useless stuff skipped. It's this series that gets merged into 
> the project history, and I discard the other history.
> 
> The real trick is that the early patches in a lot of series often refactor 
> existing code in ways that are generally good and necessary for your 
> eventual outcome, but which you'd never think of until you've written more 
> of the series.

That summarizes well how I do original development, too. Whether its a branch of an existing repo, or a newly cloned repo, when working on new code I will do a first pass, committing as I go to provide useful checkpoints.

Once I reach a satisfactory state, I'll refactor the patches so that they make sense for upstream submission.

	Jeff
Previous: Daniel BarkalowNext: Mike Hommey
Message 11 of 29 in “Question about your git habits”
  1. Chase VentersFeb 23, 2008
  2. Tommy ThornFeb 23, 2008
  3. Steven WalterFeb 23, 2008
  4. Jan EngelhardtFeb 23, 2008
  5. Al ViroFeb 23, 2008
  6. Junio C HamanoFeb 23, 2008
  7. Al ViroFeb 23, 2008
  8. Junio C HamanoFeb 23, 2008
  9. Samuel TardieuFeb 23, 2008
  10. Daniel BarkalowFeb 23, 2008
  11. Jeff GarzikFeb 23, 2008
  12. Mike HommeyFeb 23, 2008
  13. Rene HermanFeb 23, 2008
  14. Willy TarreauFeb 23, 2008
  15. Sam RavnborgFeb 23, 2008
  16. Jakub NarebskiFeb 23, 2008
  17. J.C. PizarroFeb 23, 2008
  18. J.C. PizarroFeb 23, 2008
  19. Charles BaileyFeb 23, 2008
  20. J.C. PizarroFeb 23, 2008
  21. Charles BaileyFeb 23, 2008
  22. J.C. PizarroFeb 23, 2008
  23. Charles BaileyFeb 23, 2008
  24. J.C. PizarroFeb 23, 2008
  25. Charles BaileyFeb 23, 2008
  26. J.C. PizarroFeb 23, 2008
  27. Charles BaileyFeb 23, 2008
  28. J.C. PizarroFeb 23, 2008
  29. Mike HommeyFeb 23, 2008

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.