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

Question about your git habits

From
CVChase Venters <chase.venters@clientec.com>
Date
Feb 23, 2008, 00:37 UTC
Message-ID
<200802221837.37680.chase.venters@clientec.com>

I've been making myself more familiar with git lately and I'm curious what habits others have adopted. (I know there are a few documents in circulation that deal with using git to work on the kernel but I don't think this has been specifically covered).

My question is: If you're working on multiple things at once, do you tend to clone the entire repository repeatedly into a series of separate working directories and do your work there, then pull that work (possibly comprising a series of "temporary" commits) back into a separate local master respository with --squash, either into "master" or into a branch containing the new feature?

Or perhaps you create a temporary topical branch for each thing you are working on, and commit arbitrary changes then checkout another branch when you need to change gears, finally --squashing the intermediate commits when a particular piece of work is done?

I'm using git to manage my project and I'm trying to determine the most optimal workflow I can. I figure that I'm going to have an "official" master repository for the project, and I want to keep the revision history clean in that repository (ie, no messy intermediate commits that don't compile or only implement a feature half way).

On older projects I was using a certalized revision control system like *cough* Subversion *cough* and I'd create separate branches which I'd check out into their own working trees.

It seems to me that having multiple working trees (effectively, cloning the "master" repository every time I need to make anything but a trivial change) would be most effective under git as well as it doesn't require creating messy, intermediate commits in the first place (but allows for them if they are used). But I wonder how that approach would scale with a project whose git repo weighed hundreds of megs or more. (With a centralized rcs, of course, you don't have to lug around a copy of the whole project history in each working tree.)

Insight appreciated, and I apologize if I've failed to RTFM somewhere.

Thanks, Chase

Next: Tommy Thorn
Message 1 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.