On Sun, Oct 21, 2018 at 10:08:53AM +0200, Nguyễn Thái Ngọc Duy wrote: > diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt > index e2ee9fc21b..a50fbf8094 100644 > --- a/Documentation/git-worktree.txt > +++ b/Documentation/git-worktree.txt > @@ -204,6 +204,22 @@ working trees, it can be used to identify worktrees. For example if > you only have two working trees, at "/abc/def/ghi" and "/abc/def/ggg", > then "ghi" or "def/ghi" is enough to point to the former working tree. > > +REFS > +---- > +In multiple working trees, some refs may be shared between all working > +trees, some refs are local. One example is HEAD is different for all > +working trees. This section is about the sharing rules. > + > +In general, all pseudo refs are per working tree and all refs starting > +with "refs/" are shared. Pseudo refs are ones like HEAD which are > +directly under GIT_DIR instead of inside GIT_DIR/refs. There are one > +exception to this: refs inside refs/bisect and refs/worktree is not > +shared. > + > +To access refs, it's best not to look inside GIT_DIR directly. Instead > +use commands such as linkgit:git-revparse[1] or linkgit:git-update-ref[1] s/revparse/rev-parse/ > +which will handle refs correctly. > +