Reuse .git directory.
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
git-new-worktree, perhaps?
Hi,
Quoted 2 lines
I would like work 4 different branch simultaneously viz.
master, feature, bugfix, expt but would like to use same sameGIT_DIR. Is this possible ? so that I can save some space ?
All Git branches *are* contained in the same GIT_DIR. I'm not sure what your question is, but I suspect you don't understand how branching works in Git. Please read up some introductory material on this.
-- Ram