Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 281 Bytes

2021-12-14_bring-back-a-deleted-file.md

File metadata and controls

9 lines (6 loc) · 281 Bytes

Bring back a deleted file

When you're in a branch, and deleted a file, say from the main branch, and want to bring it back:

git restore --source main path/to/the/file/that/exists/on/main/but/not/the/current/branch

TADA! The file is back, no copy and paste or whatever