-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michal Vlasák
committed
Jun 11, 2024
1 parent
8b51115
commit 9ecdc53
Showing
2 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: VS Code Local History | ||
description: VS Code verzování souborů | ||
date: 2024-06-11 | ||
tags: | ||
- til | ||
layout: layouts/post.njk | ||
draft: false | ||
--- | ||
Dnes jsem si svou neopatností smazal zdrojáky, na kterých jsem pár hodin pracoval. V gitu jsem je ještě commitnuté neměl, takže nebyli ani v reflogu, tak už jsem myslel že je všemu konec. Ale ukázalo se, že VS Code obsahuje ["Local History"](https://code.visualstudio.com/updates/v1_66#_local-history), která (pokud je zapnutá) uchovává starší verze souboru. Dostat se k nim lze buď přes příkaz "Local History: Find Entry to Restore" nebo tak, že vytvoříte stejně pojmenovaný soubor na stejném místě a v Explorer tabu pak vlevo rozbalíte Timeline. Teď si raději související nastavení změním na vyšší počet souborů. |