Suppose I have a branch from another repo (yyy
), which I want to merge into the current one (xxx
).
But I want to exclude some files, like config.js
, options.js
and views/home.ejs
, so that they stay as they were in my current repo xxx
even if they have been changed in yyy
.
How do I do that?
I figured out how I could merge the branch from another repo (below), but what should I add to keep these 3 files intact?
git remote add yyy git@github.com:yyy/yyy
git remote update
git checkout -b newbranch
git merge --allow-unrelated-histories yyy/master