Merge folder from one branch into another with git

I’m working with two branches in a git repository.

They are rc and dev.

I have a folder in dev src/ that I need to merge into rc.

I’ve tried to use git cherry-pick --strategy=recurisve --strategy-option=theirs <commit> method by first creating a shell script to add a new line to all the files in the directory to trigger a change with git.

The script was as follows:



for f in $(find $SEARCH_FOLDER);
    echo "" >> $f;

What I did not realize is that git cherry-pick is only going to take the recognized changes vis-a-vis the aforementioned newlines.

Aside from just copying the folder over into a branch of rc and then creating a commit and merging, what are my options to push my changes that I’ve been working on in dev for two weeks into the rc branch.

I understand that the way I have been developing and using git is probably inappropriate and not intended use.

Ideally, I’d like to create a patch file using the diff on the two branches subfolders src/ and apply it. Though, I’m not sure how to execute this approach.

Git Baby is a git and github fan, let's start git clone.