add note about getting files from different branches

This commit is contained in:
Tiziano Zito 2024-08-19 16:15:09 +02:00
parent 10305c4829
commit 5ce20dffbf

View file

@ -28,6 +28,9 @@
- how to *move* the whole working directory to a specific point in history?
- `git checkout <commit>``DETACHED HEAD` problem, __changes__ __files__
- interaction with branches: `git branch <branch_name>` + `git switch <branch_name>`
- how to copy a file from a different branch:
- `git checkout <branch> <file>` ➔ the file is staged automatically
- `git restore --source=<branch> <file` ➔ the file is not staged
- `git gui`: building commits along the way interactively (for the *mess around* type of workflows)
- check out these [sketches](git-commands-visualizations.pdf) for a graphical visualization of git commands!