[SM-Discuss] Sync between branch
Arwed von Merkatz
v.merkatz at gmx.net
Wed Aug 23 14:43:52 EDT 2006
On Wed, Aug 23, 2006 at 04:57:46PM +0200, Flavien Bridault wrote:
> Hi people,
> I just have a question about syncing between master and devel. Today I
> wanted to perform changes in the udev spell. However I have some
> problems at reboot and so I decided to commit my changes in devel
> instead in master.
> I would like to know what is the preferred way to achieve this.
> Here is what I was trying to do :
> 1) Generate a diff with cg-diff (git-diff) since I didn't committed the
> changes in master.
> 2) Reset the master head
> 3) Switch to the local devel branch
> 4) Syncing the spell with the spell in master
> 5) Apply the diff
> Hopelessly the real problem for me is 4)
> I first tried to replay all the commits from the spell in master, but it
> seems they are not synced from the beginning, so the first patch to be
> applied already conflicts ! Actually not, it worked for udev but not for
> init.d spell (I wanted it to be synced too because some udev commits
> also modify init.d spell, I really understand the meaning of per-spell
> commits now ;-) ).
> So should I try harder or is it possible to simply 'cp' the spell from
> master to devel and commit ?
If you really want to use devel, just copy the whole spell from master
to sync it.
With the way I want to get established for features eventually, the
whole problem disappears. I haven't yet worked out the details, but the
general workflow would be something like this:
- develop feature, notice it's unstable/needs work
- create new feature branch dev-<myfeature> based on current master
- switch to that branch (while keeping changes open)
- push feature branch
This way you always start with a current master.
Such a feature branch should be kept up-to-date with any changes related
to its spells using git rebase (not git pull). Once it's ready, the
whole branch can get merged back to master, and then the branch can be
Since branching is so simple and cheap in git, that is a lot easier than
having a standing devel branch that needs to be kept up-to-date.
As far as I know, deleting remote branches isn't implemented in git yet,
so we'll work out some process to get those cleaned out regularly.
I want to get the exact commands and workflow tested before really
proposing it, I hope to have time this weekend (for real this time ;).
Arwed v. Merkatz Source Mage GNU/Linux developer
More information about the SM-Discuss