Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions content/cheat-sheet/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,14 @@ <h2 id="ways-to-refer-to-a-commit">Ways to refer to a commit</h2>
<h2 id="discard-your-changes">Discard Your Changes</h2>
<div class="item">
<h3>Delete unstaged changes to one file:</h3>
<code>git restore &lt;file&gt;</code>
<span class="or">OR</span>
<code>git checkout &lt;file&gt;</code>
</div>
<div class="item">
<h3>Delete all staged and unstaged changes to one file:</h3>
<code>git restore --staged --worktree &lt;file&gt;</code>
<span class="or">OR</span>
<code>git checkout HEAD &lt;file&gt;</code>
</div>
<div class="item">
Expand Down
Loading