I'm developing a system as part of a small team (3 people). The development has been running for a couple of years and probably has about another year to go. We are using git for version control and generally do our development on master
, using pull
and push
.
About six months ago, when I was, maybe, 75% through developing a new feature, project priorities changed and I needed to start on a second feature. Before embarking on the new development, I committed most of the partially-finished development to a new branch - parked
. The second feature turned into a third and a fourth - I'm sure you are familiar with the scenario.
We are now almost ready to resume development of the first feature and I'd like to recover the parked code. In the meantime, we have pre-released the system to some users who don't need the (original) first feature.
My instinct is merge the changes from trunk onto the parked
branch via
$ git checkout parked
$ git merge origin/master
so as to have somewhere to continue/complete the development and to resolve any problems while we support our external users on master
. Eventually (soon I hope) I will merge the changes back from parked
to master
.
I've found a couple of other questions on stackoverflow that seem to deal with similar questions. Version control - which way to git merge suggests merging from parked
to master
initially so as to allow use of git log --first-parent
; we don't currently make extensive (any) use of this command - are we missing something that might be useful? Which way to merge with git recommends using git rebase
; another command that we don't currently use - should we?
I've never used git before starting on this project, but I believe I'm familiar with version control concepts.
I'm still inclined to follow my first instinct and begin by merging from master
to parked
; complete the development there and then merge the changes to master
, but I see there are valid alternatives. I don't at present understand the pros and cons of the alternatives - please could someone explain.