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

Reuse .git directory.

From
MVMahesh Vaidya <forvaidya@gmail.com>
Date
Mar 25, 2010, 17:50 UTC
Message-ID
<10467746.91269539410487.JavaMail.mvaidya@mvaidya-desktop>
Reuse .git directory.
I would like work 4 different branch simultaneously viz.
master, feature, bugfix, expt but would like to use same same GIT_DIR. Is this possible ? so that I can save some space ?
I have tried following 
* git clone /path/to/repos
* export GIT_DIR=/path/to/repos/.git
* mkdir ~/feature
* git checkout -b feature master
This step misses the files. Please advise me if such an approach is correct ?
Thx
Mahesh
Next: Ramkumar Ramachandra
Message 1 of 3 in “Reuse .git directory.”
  1. Mahesh VaidyaMar 25, 2010
  2. Ramkumar RamachandraMar 25, 2010
  3. Junio C HamanoMar 25, 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.