Re: The shared Git repo used by git-new-workdir
- From
- Holger Hellmuth <hellmuth@ira.uka.de>
- Date
- Jan 16, 2012, 19:15 UTC
- Message-ID
- <4F14774A.40100@ira.uka.de>
- In-Reply-To
- <CAE1pOi3JocCoDGAmpCYdGdJN4E1nz8O4_i0MtLhwhP_axmH-uw@mail.gmail.com>
On 16.01.2012 19:57, Hilco Wijbenga wrote:
Show 16 quoted lines
> In my working directory: > hilco@centaur /mnt/lacie/workspaces/my-project-master > my-project-master (master $ u=)$ git status > # On branch master > nothing to commit (working directory clean) > > In the shared repo: > hilco@centaur ~/git-clones/my-project my-project (master +$ u=)$ git status > # On branch master > # Changes to be committed: > # (use "git reset HEAD<file>..." to unstage) > # > # deleted: .gitattributes > # modified: .gitignore > # new file: ... > ... hundreds more ...
This is related to your using two repos with the same branch (irrespective of root repo or not).
There is nothing wrong with that per se, but if you add/commit/merge etc in one of those two, the working directory and index of the other repo doesn't get updated automatically. You would have to do "git reset --hard" in that repo to get it up-to-date
If you want to avoid this just don't check out the same branch in any two repos, root or not.