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

Re: Git drawbacks?

From
B Smith-Mannschott <bsmith.occs@gmail.com>
Date
Nov 9, 2009, 18:47 UTC
Message-ID
<28c656e20911091047r353e9451hd856b99541fbd5ff@mail.gmail.com>
In-Reply-To
<loom.20091109T170054-451@post.gmane.org>
On Mon, Nov 9, 2009 at 17:11, Dmitry Smirnov <divis1969@gmail.com> wrote:
Show 15 quoted lines
> Dmitry Potapov <dpotapov <at> gmail.com> writes:
>
>
>> Actually, in most use cases, there is no reason to have more than one
>> working tree. Git is designed to work well with plenty branches and one
>> working tree. So, switching between two branches and recompiling a few
>> changed files is much faster then going to another directory and try to
>> work there, because when you go to another directory, you may hit cold
>> cache and disk is *slow*... Another thing is that you can do a lot of
>> things without checking out some branch. You can grep any revision in
>> your repository, you can insect any file from it, etc and you do not
>> have to checkout this revision in your working tree.
>
> Shouldn't I even worry about my not yet commited changes before switching the
> branch?
commit them before you switch. you could:
- commit them to the current branch before you switch the branch.
- commit them to a new branch before you switch
- use git stash to move your changes aside.
> I would say that this approach does not work if the build and test could take
> significant time. While in CR fix I don't want to wait for a build to complete
> before I countinue with another bug/fix. That is why I'm curious about
> few working trees...

You don't have to wait to comitting to your own branches, but do make sure to run your usual builds and tests before pushing or asking another to pull changes from you.

// Ben
Previous: Paolo BonziniNext: Dmitry Potapov
Message 18 of 27 in “Git drawbacks?”
  1. Dmitry SmirnovNov 6, 2009
  2. Avery PennarunNov 6, 2009
  3. Dmitry SmirnovNov 6, 2009
  4. Jacob HelwigNov 6, 2009
  5. Avery PennarunNov 6, 2009
  6. david@lang.hmNov 6, 2009
  7. Dmitry SmirnovNov 9, 2009
  8. Jacob HelwigNov 9, 2009
  9. Dmitry SmirnovNov 9, 2009
  10. Jacob HelwigNov 9, 2009
  11. Dmitry PotapovNov 9, 2009
  12. Dmitry SmirnovNov 9, 2009
  13. Dmitry PotapovNov 9, 2009
  14. Dmitry SmirnovNov 10, 2009
  15. Dmitry PotapovNov 10, 2009
  16. Dmitry SmirnovNov 10, 2009
  17. Paolo BonziniNov 10, 2009
  18. B Smith-MannschottNov 9, 2009
  19. Dmitry PotapovNov 9, 2009
  20. Dmitry SmirnovNov 10, 2009
  21. Dmitry PotapovNov 10, 2009
  22. Dmitry SmirnovNov 10, 2009
  23. Paolo BonziniNov 10, 2009
  24. Dmitry PotapovNov 10, 2009
  25. Dmitry SmirnovNov 10, 2009
  26. Dmitry SmirnovNov 9, 2009
  27. Dmitry SmirnovNov 11, 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.