git checkout main
git checkout -b branch-b
git checkout branch-a :rel/path/to/yourchangedfiles
git commit -m "w"
git checkout branch-a
git checkout main :rel/path/to/yourchangedfiles
# if this happens:
error: pathspec ':rel/path/to/yourchangedfiles' did not match any file(s) known to git
# then just rm the folder
trash-put rel/path/to/yourchangedfiles