This GIT Command Saved Me Hours Of Work

Опубликовано: 22 Июнь 2026
на канале: LifeLoveAndMonads
550
20

When sometimes I am guilty of making big PRs I didn't know what to do until my colleague showed me this trick using git checkout command.

Note: Starting from Git 2.23 some of the git checkout functionality has been replaced with two other commands - git switch and git restore. So things shown in this video should be possible not only with git checkout but also with git restore:

git restore --source branch-name path/to/file