There is a github project with default branch product/master
owned by someone other.
I want to add some feature to this project. The problem is that before I start develop this feature, I need to configure project for my hardware changing source code files (conf.h
, advanced_conf.h
, ...). But I don't want those configuration changes be PRed to original repo.
What way I should go to develop on some branch with changes ahead original, and after development done, exclude few commits and their changes from history?
There is a way to "remember not to add" some files every commit, but I think there must be something more effective.
How to deal with it more correctly?
- I create a fork repo
my
with same default branchmy/master
- I create branches
my/config
andmy/feature-dev
frommy/master
- I change some config files in
my/config
and commit - I create a PR from
my/config
intomy/feature-dev
- I develop a feature in
my/feature-dev
and commit many times. - (?) Now I need somehow to create
my/feature-release
which is based onmy/master
, but containing commits I made tomy/feature-dev
excluding commits made by PRmy/config
=>my/feature-dev
- I create a PR of
my/feature-release
intoproduct/master
, PR is accepted, everyone is happy.
So questions are:
- Is there a correct way doing this?
- How to clone branch excluding some known commit ids?