From 5ce20dffbff228650e433ab77632c8a5bb1983c4 Mon Sep 17 00:00:00 2001 From: Tiziano Zito Date: Mon, 19 Aug 2024 16:15:09 +0200 Subject: [PATCH] add note about getting files from different branches --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1978ffe..2e4865a 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,9 @@ - how to *move* the whole working directory to a specific point in history? - `git checkout ` ➔ `DETACHED HEAD` problem, __changes__ __files__ - interaction with branches: `git branch ` + `git switch ` +- how to copy a file from a different branch: + - `git checkout ` ➔ the file is staged automatically + - `git restore --source=