[kwlug-disc] git: merging some but not all commits

Khalid Baheyeldin kb at 2bits.com
Thu Mar 21 08:14:52 EDT 2019


Did you try adding the configuration files to the .gitignore file?
That way, git will not do any revision control on them.


On Thu, Mar 21, 2019 at 3:00 AM Paul Nijjar via kwlug-disc <
kwlug-disc at kwlug.org> wrote:

> 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
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>


-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
Simplicity is the ultimate sophistication. -- anonymous
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20190321/54985ae9/attachment.htm>


More information about the kwlug-disc mailing list