Skip to content

Commit 5b7561d

Browse files
committed
Update reset to recomended restore --staged
1 parent b627011 commit 5b7561d

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

assets/diagrams/undo-modified.svg

Lines changed: 1 addition & 1 deletion
Loading

sections/getting-started.tex

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -404,13 +404,7 @@ \subsection{Unstaging modifications}
404404
\begin{frame}[fragile]
405405
\subslidetitle
406406

407-
The command \cmd{git reset} allows you to unstage a file:
408-
409-
\begin{lstlisting}
410-
$ (*\textcolor[HTML]{0000AA}{git reset AUTHORS}*)
411-
Unstaged changes after reset:
412-
M AUTHORS
413-
\end{lstlisting}
407+
The command \cmd{git restore --staged} allows you to unstage a file.
414408

415409
\vspace{1em}
416410
\centerline{\includegraphics{assets/diagrams/undo-staged}}
@@ -420,7 +414,7 @@ \subsection{Unstaging modifications}
420414
\subsection{Resetting modifications}
421415
\begin{frame}[fragile]
422416
\subslidetitle
423-
After \cmd{git reset}, the modification is still there:
417+
After \cmd{git restore --staged}, the modification is still there:
424418
\begin{lstlisting}
425419
$ (*\textcolor[HTML]{0000AA}{git status}*)
426420
On branch master
@@ -467,7 +461,7 @@ \subsection{Removing a file}
467461
Your branch is ahead of 'origin/master' by 4 commit.
468462
(use "git push" to publish your local commits)
469463
Changes to be committed:
470-
(use "git reset HEAD <file>..." to unstage)
464+
(use "git restore --stage <file>..." to unstage)
471465

472466
(*\textcolor[HTML]{00AA00}{deleted:}*) (*\textcolor[HTML]{00AA00}{test.file}*)
473467
\end{lstlisting}

0 commit comments

Comments
 (0)