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

Re: Multiple checkouts active for the same repository

From
GNGustavo Narea <gnarea@tech.2degreesnetwork.com>
Date
Sep 24, 2010, 11:55 UTC
Message-ID
<4C9C919F.3040005@tech.2degreesnetwork.com>
In-Reply-To
<4C9C6F8B.3090806@tech.2degreesnetwork.com>

I guess it all comes down to one thing: How can I avoid Git's feature of making only one branch/checkout active at a time under the same path?

I need to have the branches and their checkouts on different directories, and it seems like the only way to do it is having one repository per branch/checkout, which doesn't look like the ideal way of doing things in Git.

Apart from the situation I describe in the initial email, there's another limitation in the development environment: Our IDE, Eclipse + Pydev, assumes each project (i.e., branch/checkout) to be on different directories and each project should have different settings (e.g., paths to dependencies, which could be different), but with GIt everything would be a single project because it's all on the same path.

Thanks in advance.
 - Gustavo.
On 24/09/10 10:29, Gustavo Narea wrote:
Show 33 quoted lines
> Hello.
> 
> We're currently migrating from another DVCS, which allows us to have
> working copies of each branch in separate directories, so that their
> code can be used simultaneously. However, I haven't found a way to do
> this with Git, at least not an easy way. Can you please help me?
> 
> We are a team of Web developers and testers working on an application.
> There are always a few development branches and a stable branch, and
> testers need all the branches with the very latest code available at all
> times.
> 
> The way we handle it at the moment is very simple because the server
> hosting the remote repository is the same that hosts the deployed
> instances of each branch, so when we push to the remote repository, the
> code for each site is automatically updated.
> 
> We use the following structure:
> /srv/repositories/project/branch1
> /srv/repositories/project/branch2
> /srv/repositories/project/branch3
> 
> Is there any simple way to do this with Git? I can only think of two
> options that involve hooks:
> 
>     * Have a hook that exports each branch to a directory like
>       /srv/repositories/project/branchN
>     * Have one Git repository per branch, so that each repository have a
>       different checkout active. Then the main remote repository will
>       have post-receive hooks that trigger a pull on each individual
> 
> I'm not particularly happy with either way. Is there a better solution?
> 
-- 
Gustavo Narea.
Software Developer.
2degrees, Ltd. <http://dev.2degreesnetwork.com/>.
Previous: Gustavo NareaNext: Ævar Arnfjörð Bjarmason
Message 2 of 9 in “Multiple checkouts active for the same repository”
  1. Gustavo NareaSep 24, 2010
  2. Gustavo NareaSep 24, 2010
  3. Ævar Arnfjörð BjarmasonSep 24, 2010
  4. Gustavo NareaSep 24, 2010
  5. Julian PhillipsSep 24, 2010
  6. Joshua JensenSep 24, 2010
  7. Gustavo NareaSep 27, 2010
  8. Martin PetterssonSep 27, 2010
  9. Jakub NarebskiSep 24, 2010

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.