lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Proposed workflow for proprietary repository


From: Greg Chicares
Subject: Re: [lmi] Proposed workflow for proprietary repository
Date: Sun, 20 Mar 2016 19:50:31 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On 2016-03-07 18:15, Greg Chicares wrote:
[...workflow based on email patches...]

The 'git format-patch'..'git am' workflow proposed earlier was complex,
fragile, and unnatural. The 'git bundle' idea demonstrated here:
  http://lists.nongnu.org/archive/html/lmi/2016-03/msg00024.html
is clearly preferable. (Incidentally, it also uses less bandwidth:
62516 bytes instead of 636813 for a recent set of three production
changes). Here is a usable 'git bundle' workflow that unifies earlier
list emails.

* Preliminary git configuration

Use your name and email address instead of mine. This "user" identity
will be embedded in patches we send among ourselves.

  git config --global user.name "Gregory W. Chicares"
  git config --global user.email address@hidden

* Setting up a working copy

We start with a "blessed" git repository (shared in email) that has
been migrated from svn. Let's save the emailed tarball in /opt/lmi/ ,
extract it there...

  cd /opt/lmi
  tar -xjvf proprietary-blessed-repository.tar.bz2

...and make a working copy:

  git clone file:///opt/lmi/blessed/proprietary

The resulting /opt/lmi/proprietary directory looks very much like a
checked-out working copy of the old svn repository. Instead of .svn/
it has .git/ , but its subdirectories are otherwise identical: they
have the same names and exactly the same contents.

Compare the sha1sums, which should certainly be identical:

  cd /opt/lmi/blessed/proprietary; git rev-parse HEAD
b5f2b3d4cfd179bbe4ac433d5bbe86d922bec2dc
  cd /opt/lmi/proprietary; git rev-parse HEAD
b5f2b3d4cfd179bbe4ac433d5bbe86d922bec2dc

This 'git bundle' demonstration:
  http://lists.nongnu.org/archive/html/lmi/2016-03/msg00024.html
showed the interplay between two machines, both simulated in /tmp
subdirectories, each containing a representation of the other. Here,
the "blessed" repository will serve to represent the remote; it is
by default already configured to do that.

Here's how to create a bundle to share by email. Make any number of
changes to the local repository, and commit them in whatever groups
make sense:

  cd /opt/lmi/proprietary
  git commit --all -m"One set of changes"
  git commit --all -m"Another set of changes"

When it's ready to share, do this:

  cd /opt/lmi/proprietary
  git bundle create YourBundleName ^origin/master HEAD --branches

(using a more descriptive name) and send the file as an email
attachment. Then push the changes to your "blessed" repository:

  git push

[You can run 'git log' in both your repositories, comparing the
sha1sums as above, to see that they match.]

When you receive a bundle in email, do this:

  cd /opt/lmi/proprietary
  git bundle verify /path/where/you/saved/TheirBundleName
  git pull /path/where/you/saved/TheirBundleName

When that succeeds, do:

  git push

to synchronize your "blessed" repository with your correspondent's.
Once the HEAD sha1sums match, we can discard the bundles.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]