Notes about different listings in different branches

This commit is contained in:
Kenneth John Odle 2025-02-22 13:39:14 -05:00
parent ab22c14cbc
commit eacd9753d5
5 changed files with 41 additions and 0 deletions

View File

@ -741,6 +741,39 @@ git push <remote_name> --delete <branch_name>
\todo[inline]{Add information about directory contents in the different branches} \todo[inline]{Add information about directory contents in the different branches}
Note that what you see in your directory (both in a text editor and in your GUI) will depend upon which branch you have checked out. For example, in our branching example, we will first check out the \texttt{main} branch and then do a file listing:
\input{include/gitcheckoutmain&ls}
which will then give us this output:
\begin{Verbatim}[]
doc_a.txt
\end{Verbatim}
Here's a screen capture of our online version, but if you've cloned this locally and are looking at the \texttt{main} branch, you should see something like this:
\vspace{0.5\baselineskip}
\frame{\includegraphics[scale=0.75]{gitea-checkout-main}}
\vspace{\baselineskip}
If we checkout the \texttt{testbranch} branch and then do a file listing:
\input{include/gitcheckouttestbranch&ls}
we get this output:
\begin{Verbatim}[]
doc_a.txt doc_b.txt
\end{Verbatim}
Again, here's a screen capture of our online version, which should resemble what you see in your GUI if you've cloned this:
\vspace{0.5\baselineskip}
\frame{\includegraphics[scale=0.75]{gitea-checkout-testbranch}}
\section{Uses of Branching} \section{Uses of Branching}
\todo[inline]{Add notes about uses in technical writing, creative writing} \todo[inline]{Add notes about uses in technical writing, creative writing}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,4 @@
\begin{Verbatim}[]
$ git checkout main
$ ls
\end{Verbatim}

View File

@ -0,0 +1,4 @@
\begin{Verbatim}[]
$ git checkout testbranch
$ ls
\end{Verbatim}