[kwlug-disc] git: merging some but not all commits
Paul Nijjar
paul_nijjar at yahoo.ca
Thu Mar 21 03:00:07 EDT 2019
I am sure this is a completely standard question, but you know me.
I have a git repo (for a website that I did not create) which has some
configuration options checked into git. Let's call this branch
'master'.
I want to have a development version of the website on my laptop. To
do this, I have to change some of these configuration options.
I made a new branch (let's call it 'devel') and checked it out. Then I
made the changes to my configuration files until I got a local version
of the website working.
Let's say I check those changes into the 'devel' branch as commit
'abcdef' . (This may be a terrible idea.)
I want to do some development. I make some more changes to the
devel branch and check them in. Hooray!
Now it is time to merge the changes I made from devel to master. If I
naively git merge then I will get commit abcdef, which merges in
config options for development, which screws everything up for
production. Oh no!
I can cherry-pick commits from devel and merge them to master, but
that seems gross and error-prone. Is there a better way for me to
merge the changes from devel into master, EXCLUDING a set of commits
hat I never want merged? I am happy to make additional branches off
of devel if that helps. I do not think that keeping all the
configuration differences between master and devel out of git is
feasible.
What is the right workflow for this situation? How should I be setting
things up?
- Paul
--
http://pnijjar.freeshell.org
More information about the kwlug-disc
mailing list