4 ms·
Another way to look at this, is that a working copy is a projection of the state of a repository at a particular commit. If you are working on or with a tool th
by numbsafari 3y ago
Another way to look at this, is that a working copy is a projection of the state of a repository at a particular commit. If you are working on or with a tool that utilizes the repository contents to drive it, then you can expose multiple instances or versions of the tool from those projections, while leveraging a shared content cache and upstream configuration.
For example, let's say you are working on a static site (this is just an example). You can have a web server running that is serving the main worktree from https://mysite.local/ https://mysite.local/, and any worktrees from https://mysite.local/~[worktree]/ https://mysite.local/~[worktree]/. Then, if you want to make a particular branch available for someone to review in their browser to provide feedback, you can direct them to the worktree URL while you continue doing other work either in your main branch, or on other branches altogether.