From: Andrew Schein <andrew@andrewschein.com>
To: Daniel Barkalow <barkalow@iabervon.org>, git@vger.kernel.org
Subject: Re: git default behavior seems odd from a Unix command line point of view
Date: Tue, 12 May 2009 16:05:47 -0400 [thread overview]
Message-ID: <4e963a650905121305s244309a5vef9eec671d1ee5e@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.0905121415000.2147@iabervon.org>
> What *is* your use case? What you're doing seems nuts to me (like, you're
> going to send out files with this script that someone is in the middle of
> editting), but I don't know what you're trying to do.
I am new to git... so my first instinct is to try to reproduce a work
flow that I know works with mercurial setup. It is possible that the
concepts don't translate correctly. Here goes...
I have a bunch of separate project-related repositories. There are
very few users of the system. Most of the time I am the only user. I
want a system for syncing my local repositories to a single shared
repository. For example some days I work on my laptop, and some days
from my desktop. A third "shared/public" repository "on campus"
serves as an always available repository that anyone I collaborate
with can pull from. Also it is backed up, and for this reason I
designate it the "shared" version. So the purpose of the sync.sh
script is to synchronize the personal laptop/desktop repository to the
on-campus version.
Something I have learned from using mercurial in industry is that when
somebody messes up a "public repo" with conflicts they frequently
don't clean up the mess. This can be a sign that they have not
learned the lessons of cleanliness rather than ill intent. Otherwise
(and similarly) this messiness can be caused from not noticing that
they have left a mess.
The motivation of having a sync script that is run on each user's
local repository is to decrease the likelihood of a mess. This is
achieved by first pulling from the common repository and resolving
conflicts _before_ "pushing" (note quotations) their changes to the
common repository. There is a possibility of a race condition that
leaves a conflict on the shared repository, however the risk is
diminished.
Finally, I use "push" in quotes because actually the script uses only
uses the pull command. This prevents proliferation of branches on the
shared repository.
Is there a better way to achieve this in git than the sync.sh script I
sent around?
Thanks,
Andy
--
Andrew I. Schein
www.andrewschein.com
next prev parent reply other threads:[~2009-05-12 20:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 15:18 git default behavior seems odd from a Unix command line point of view Andrew Schein
2009-05-12 16:12 ` Junio C Hamano
2009-05-12 16:24 ` Andrew Schein
2009-05-12 16:34 ` Jeff King
2009-05-12 18:26 ` Daniel Barkalow
2009-05-12 20:05 ` Andrew Schein [this message]
2009-05-12 20:50 ` Daniel Barkalow
2009-05-12 16:24 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e963a650905121305s244309a5vef9eec671d1ee5e@mail.gmail.com \
--to=andrew@andrewschein.com \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).