Reputation: 2402
I want to upstream my fork repo with the forked-from repo but, I don't want to fetch a specific folder of their repo because I have my own customized folder in my repo.
except that I want all their other updates.
Actually, I made a pull request to their repo and made that folder, my PL has been merged and during the time they updated and changed some options on it. all I want is to use my own customization on that folder, with their updates on other sides.
my fork repo and their repo the folder I want to exclude is snippets/frameworks/django/
Upvotes: 0
Views: 505
Reputation: 8900
The idiomatic way to accomplish this is not by excluding their folder updates, but simply include your local changes, i.e. in form of a local-only branch. That way, you can benefit from all versioning/change tracking goodness.
A sketch for a rebase-based flow for local-only changes:
git clone https://github.com/rafamadriz/friendly-snippets
git checkout -b my-changes
git add snippets/frameworks/django
git commit -m "django: change foo & bar"
You might even want to push your branch to your forked repo.
If upstream now receives updates you are interested in, simply:
git fetch origin
git rebase origin/main
(while still on branch my-changes
)If no conflicts happened, now your changes are performed against the latest upstream state.
If conflicts are more common, you might be interested in tracking the resolution explicitly, and switch to a merge-based integration flow.
Upvotes: 1