'Sync a fork with original repo but exclude some original repo's commits : Best practice?
Beginner here, I was wondering what would be the best practice for the following use case :
- I fork a repo to develop my own features (and clone the fork to my computer, setting its upstream to the original repo). My clone has a dedicated branch for features I implement, and main branch which is just a clone of the upstream/main.
- I want to sync with 90% of original repo's commits, but about 10% of the commits don't interest me : what is the best practice in that case ? Say I haven't synced for a week, there have been 50 commits to the original repo. I want to sync with original repo at the exception of 5 commits. How to do that ?
- Is it possible to merge with upstream but excluding some commits of the original repo ?
- Should I just cherry pick the desired commits and ignore the others (but on the given example, I have to cherry pick 45 commits just to ignore 5 commits ?)
- Should I use another git command (I've heard about rebase, not sure if adapted in that case).
It's probably a very basic question, but I have not yet stumbled upon a clear answer, so thanks for your help !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
