Say, i have 2 branches in my git project and I wrote some code in one branch and want to copy it to another branch (while I don't want to merge or cherry-pick commits). I usually use ctrl+c, git checkout another-branch, ctrl+v, but when there's planty of code in different places it quickly becomes a mess. I would first copy all the code to some temp file, then checkout another branch and past it hunk by hunk.
Is there some more efficint way to do it? For example, it would be nice if I could select the files with the code that I want to move, and sort of "freeze them" (copy them outside of project and mark as read-only). Anything you can suggest?