Example configuration of mr with vcsh?

John Whitley whitley at bangpath.org
Sat May 28 22:09:48 CEST 2016

Marc Haber <mh+vcs-home at zugschlus.de> wrote:
> Hi John,
> On Fri, May 27, 2016 at 12:47:04PM -0700, John Whitley wrote:
>> You can check out my setup at jwhitley/vcsh-root on Github[1].
> One more question: When you live with this setup, is there a "golden
> host" which you usually use to push your changes, or do you regularly
> push from any host that might have been the cause or a change?

No.  I assume that there are multiple hosts which may have changes “in flight”.  This may be a desktop vs. laptop, personal vs. work system, multiple work VMs, and so on.

> Are all your host's checkouts on the master branch and get
> continuously rebased when you pull, or do you have host-specific
> branches on all hosts? If you have host-specific branches, how do you
> push/merge/pull/fetch to distribute your changes to other hosts?

See my vcsh hooks at [1]: one hook runs `git config pull.rebase true` on every repo.  Thus any attempt to pull into one of my vcsh managed repos automatically rebases.  So my workflow is generally:

1) `vcsh pull`, to grab any changes on GitHub not on this host.  This rebases.
2) `vcsh push`, and done.

It’s really rare that I have any conflicts during rebase.  When I do, they always tend to be trivial.  Conflicts most commonly happen because I forgot to push some important fix from one host and decide to rewrite it on another.

This creates a purely linear history, and I find to be much easier to manage than per-host repos, IMO.  No merging to multiple branches, no complex history.

As for per-host configuration, I use two approaches.  First, my zsh setup has both environment and alias configuration that’s architecture specific from files under `~/.zlocal/${arch}`, and optionally loads non-version controlled, this-host-only configuration from `~/.zlocal/this`.  Second, I can always modify the enabled set of vcsh/mr repos on one host.  If needed, I’ll add a host-specific repo if there are changes that really need to be versioned and isolated (e.g. for a work context).  

—- John

[1] https://github.com/jwhitley/vcsh-root/tree/master/.config/vcsh/hooks-available

More information about the vcs-home mailing list