From 6d4ba834c329b54481c6f3b626e22ffe13adf9f4 Mon Sep 17 00:00:00 2001 From: Kenneth Odle Date: Sat, 25 Jan 2025 16:02:57 -0500 Subject: [PATCH] =?UTF-8?q?Added=20information=20on=20=C2=ABgit=20stash?= =?UTF-8?q?=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- git-primer.tex | 2 ++ 1 file changed, 2 insertions(+) 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.