Git repo: Unravelling my mess into tidy branches

Posted by Martin on Programmers See other posts from Programmers or by Martin
Published on 2012-10-26T11:07:24Z Indexed on 2012/10/26 11:16 UTC
Read the original article Hit count: 253

Filed under:
|

I wanted to play with a project, so git cloned it and, following its instructions, created a local branch for my configuration (I guess so that users can merge updates back).

At first I was just tweaking to suit my preferences, so I didn't bother with any further branching, but now I have some code that might be useful to someone else, but with my passwords, etc in the same branch.

Effectively, I have one big branch from which I'd like to have:

  • Postgres backend (default) but with some new code I've added
  • MySQL backend (the biggest change I've made) with that same new code
  • My settings: I can't git ignore the settings file because I occasionally have to add sections for new functionality, but I need to keep my personal settings out of the public branches! I guess this would work best as a local-only branch.
  • Dev branches, which I would branch from the MySQL.

Starting from scratch, I think I could figure out how to branch/merge the various updates, but is there an easy way to walk through the existing repo and choose which commits to apply to which branch? Or possibly create a branch from a point upstream then merge back, excluding certain commits?

© Programmers or respective owner

Related posts about git

Related posts about branching