Hi, On Tue, Jan 14 2020, Andreas Schwab wrote: > On Jan 14 2020, Martin Jambor wrote: > >> Hi, >> >> On Tue, Jan 14 2020, Andreas Schwab wrote: >>> On Jan 14 2020, Georg-Johann Lay wrote: >>> >>>> git clone --reference original-gcc ... >>> >>> Don't use --reference. It is too easy to lose work if you don't know >>> what you are doing. >> >> What are the risks, assuming I won't delete the referenced repo which >> sits on the same partition of the same local disk as the new one? > > The risk is if the original repository is gc'd (and nowadays git > automatically runs git gc --auto from time to time) it may lose objects > that are still needed by the referencing repository. That doesn't > happen with git worktree as the main repository knows about all > references, including worktree local reflogs.
Aha, that makes sense. In my intended setup, that *probably* would not happen because the referenced repo would only hold stuff from the upstream one but the danger sounds real enough for me to reconsider and use worktrees and a number of branches pointing to the same commit as master. Thanks, Martin