I go for long periods of time where I know the answer to this but then, brain fart, I get confused. I have been amazed at how hard it is to find a clear statement about this. Now there is one. You're welcome.
If I want to merge source files into a target directory, I should not use a slash on the target directory path..
If I want to put a directory inside of a target directory, I should use a final slash on the target directory path.
Repeat after me: Final slash means the new directory. No slash means merge.
For example...
sourceDir
fileOne
fileTwo
targetDir
someFileOne
someFileTwo
I get a merge If I use:
cp -R sourceDir targetDir # no final slash
My targetDir ends up looking like:
targetDir
someFileOne
someFileTwo
fileOne
fileTwo
I get a new subdirectory if I add a final slash, eg:
cp -R sourceDir targetDir/ # yes final slash
The result is:
targetDir
someFileOne
someFileTwo
sourceDir
(And targetDir/sourceDir contains fileOne, fileTwo.)
Repeat after me: No slash to merge. Yes slash to create a new subdirectory.