diff --git a/git-primer.tex b/git-primer.tex index 96c3ddb..7222736 100644 --- a/git-primer.tex +++ b/git-primer.tex @@ -411,6 +411,8 @@ To get back to the latest commit, we simply checkout our current branch, which i \input{include/gitcheckoutmain} +Before checking out an earlier commit, you should make sure to add and commit any changes you have made since your last commit, to avoid losing any changes. (You can also use \texttt{git stash save} command to save your current work as a patch, then use \texttt{git stash apply} to re-apply your local changes. The exact details on this are beyond the scope of this document, however.) + Of course, the easiest way to view older commits and examine them is by using a \textit{remote} repository, because their graphical interface is far easier to navigate.