From: Jay Soffian <jaysoffian@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Russ Paielli <Russ.Paielli@gmail.com>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: basic question about push
Date: Sun, 24 Jan 2010 18:59:10 -0500 [thread overview]
Message-ID: <76718491001241559u103d2e8j38687b41bd5401a1@mail.gmail.com> (raw)
In-Reply-To: <20100124081513.GA10700@coredump.intra.peff.net>
On Sun, Jan 24, 2010 at 3:15 AM, Jeff King <peff@peff.net> wrote:
> On Sun, Jan 24, 2010 at 07:04:59AM +0000, Russ Paielli wrote:
>
>> warning: updating the current branch
>> [...]
>> What does this mean in English? And what is the correct way to transfer my
>> revisions from my home computer to my work computer? Thanks.
>
> It means your workflow will cause problems as the pusher magically
> changes your repository's concept of "the latest commit" behind the
> pushee's back. The workflow you want is described here:
>
> http://git.wiki.kernel.org/index.php/GitFaq#push-is-reverse-of-fetch
Aside, and I think we've discussed this before, but I wonder if it
would make sense to:
a) Add an option to clone such as "-p [<name>] | --push-as[=<name>]"
where <name> defaults to $(uname -n | cut -f1 -d.) This would setup
the cloned repo with a push refspec
"+refs/heads/*:refs/remotes/<name>/*". e.g.:
$ git clone -o host1 -p host2 ssh://host1/~/repo.git
$ cat repo/.git/config
...
[remote "host1"]
url = ssh://host1/~/repo.git
fetch = +refs/heads/*:refs/remotes/host1/*
push = +refs/heads/*:refs/remotes/host2/*
b) The controversial part: make this option the default the default
when cloning from a non-bare repo. There would need to be some way to
turn it off.
Of course, I'm not sure this would be any less confusing for users.
Would they wonder why they have to merge to see their pushed changes
reflected on the pushed-to repo?
It does nicely make push symmetric to fetch between two non-bare repos
though, and I think maybe that makes more sense.
j.
next prev parent reply other threads:[~2010-01-24 23:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-24 7:04 basic question about push Russ Paielli
2010-01-24 8:15 ` Jeff King
2010-01-24 19:08 ` Junio C Hamano
2010-01-25 11:00 ` Jeff King
2010-01-24 23:59 ` Jay Soffian [this message]
2010-01-25 11:08 ` 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=76718491001241559u103d2e8j38687b41bd5401a1@mail.gmail.com \
--to=jaysoffian@gmail.com \
--cc=Russ.Paielli@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).