checkout by providing the current path, .
:
git checkout other-branch-name -- .
This operation is similar to switching HEAD to another branch without checking out files, but just from the “other direction”.
As @김민준 mentions, this overwrites any uncommitted changes. Remember to either stash or commit them somewhere first if needed.