Skip to content

Commit a5d6427

Browse files
committed
Note that checking out a remote branch results in a detached HEAD
Remote branch refs are not affected by commands that use the local repository, so checking one out results in a detached HEAD.
1 parent 8c0adaa commit a5d6427

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

understanding-git.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ \subsection{\gitcmd{fetch}}
12231223
\frametitle{Notes on remote branches}
12241224
\begin{itemize}
12251225
\item Remote branches have the form \gremotebranch{$\langle$remoteName$\rangle$/$\langle$branchName$\rangle$} (e.g. \gremotebranch{origin/master})
1226-
\item Checking out a remote branch checks out the commit it points to, not the branch itself.
1226+
\item Checking out a remote branch checks out the commit it points to, not the branch itself, resulting in a detached \gHEAD{}.
12271227
\item Remote branches are not automatically updated without running commands that do so such as \gitsubcmd{fetch} or \gitsubcmd{pull}, and \gitcmd{status} will reflect that.
12281228
\end{itemize}
12291229
\end{frame}

0 commit comments

Comments
 (0)