This is directly lifted from the work of Ciaran McCreesh and can be found in its original form on his blog. This will be updated to match changes there as possible.
Ciaranm’s original Exherbo Development Workflow post (a precursor to this document) seemed to have become the standard way of doing things. However, it does rather assume that you are developing on most repositories most of the time. When that’s not the case, a new feature named “sync suffixes” may be of use. With sync suffixes, a typical workflow now looks like this:
Repositories are configured as normal, with their
sync set to point to the usual remote location. In addition, for any repository you are going to work on, you use a sync suffix to specify a local path too. For example:
sync = git://git.exherbo.org/arbor.git local: git+file:///home/users/ciaranm/repos/arbor
/home/users/ciaranm/repos/arbor is a personal copy of the repository that is entirely unrelated to the checkout Paludis uses.
Normally, when you sync, you’ll be syncing against upstream. But when you want to do some work:
cave sync --source local arborto sync just that repository, and against your local checkout rather than upstream. If you worked with branches you’ll have to also supply
-r <commit-id>to cave sync.
<commit-id>has to be the head of the branch you want to sync. You don’t have to supply the full commit-id, but at least 4 characters of it.
git commit --fixup <commit-idfor easier commit squashing later on.
git rebase -ito tidy up your work into nice friendly pushable commits. You can use
git rebase -i --autosquashif you used
fixupcommits. This will automatically squash
fixupcommits into the commits they’re fixing. Keep in mind that it’s usually better to do one thing with one commit. E.g. if you version bump a package and also implement style improvements you may want to do two commit for those two changes.
Some things to note:
sync_optionstoo, if you need it. Thus, for branches, you can use
sync_options = --branch=branch-on-upstream local: --branch=my-local-branch
Copyright 2013 Ciaran McCreesh, A Frederick Christensen