I want to copy a few files from one directory of a git repository branch to another branch that doesn't have the files. With Windows, you can copy the files and they are saved to the clipboard as they are, such as passing the actual files to some temporary directory. This allows you to delete the original files and still paste them elsewhere; basically a cut operation. I know Mac OS doesn't have the ability to cut files, so I assume that is why when I copy files from branch A, checkout branch B, and try to paste the files to the same directory for branch B, the paste option is grayed out; the files that were being referenced no longer exist to be copied.
Is there a way to enable a temporary directory where all copied items aren't simply references to the items that are being copied?
cp
means I'm copying the file from one directory to another in one move. Unless you know how to do something likecp file/at/dir/file.sh $(git checkout branch-B)/file/at/dir/file.sh
. I hope the idea behind that command makes sense; it's the same directory on two different vcs branches of the same project