public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag•fr>
To: git@vger•kernel.org
Subject: Re: git push to a non-bare repository
Date: Mon, 19 Mar 2007 10:19:47 +0100	[thread overview]
Message-ID: <vpq8xdtpp3g.fsf@olympe.imag.fr> (raw)
In-Reply-To: <20070319020053.GA11371@thunk.org> (Theodore Tso's message of "Sun\, 18 Mar 2007 22\:00\:54 -0400")

Theodore Tso <tytso@mit•edu> writes:

> On Sun, Mar 18, 2007 at 06:31:21PM +0100, Matthieu Moy wrote:
>> I have a repository with a working tree on a machine A, did a clone to
>> another machine B and commited there locally.
>> 
>> I want my changes to get back into the first repository, so I did a
>> "push". The new commit is in the history, I can see it with "git log",
>> but the modifications are not in the working tree.
>
> The general answer (which you've already received) is to tell folks is
> to simply don't use "git push" to remote trees; basically, if you ever
> have a non-bare repository, it doesn't do what you expect, and it will
> leave the novice user horribly confused.  A much better answer is to
> simply go back to machine A, and pull from machine B.

It's not really an option in my case. A is a fixe-IP/fixe-DNS machine,
while B is my home machine, behind a NAT modem-router. So, I'd have to
figure out my home IP, port-forward the ssh port from the modem to my
machine, ...

If I understand correctly the other answers, I have two options:

* Git doesn't manage this case, and doesn't care about me loosing data
  if they're not commited, I'll have to do it myself with hooks.

* Create a bare repository on machine A, and clone it to a non-bare
  repo on which I'll work. But that means duplicating the repository
  on the same filesystem of the same machine. Not really satisfactory
  either. The "light checkout" feature would make it better, but I'm
  still worried about what will happen to my light checkout when
  someone pushes to the repository.

-- 
Matthieu

  parent reply	other threads:[~2007-03-19  9:20 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-18 17:31 git push to a non-bare repository Matthieu Moy
2007-03-18 19:47 ` Junio C Hamano
2007-03-18 21:51   ` Sam Vilain
2007-03-18 22:01     ` Jakub Narebski
2007-03-18 22:18     ` Junio C Hamano
2007-03-19  2:00 ` Theodore Tso
2007-03-19  1:55   ` Junio C Hamano
2007-03-19  2:21     ` Shawn O. Pearce
2007-03-19  2:47       ` Theodore Tso
2007-03-19  2:56         ` Shawn O. Pearce
2007-03-19  3:21           ` Theodore Tso
2007-03-19  3:53             ` Shawn O. Pearce
2007-03-19  4:08               ` Nicolas Pitre
2007-03-19  6:25                 ` Theodore Tso
2007-03-19  6:44                   ` Junio C Hamano
2007-03-19 15:20                     ` Nicolas Pitre
2007-03-19 15:16                   ` Nicolas Pitre
2007-03-19 23:58               ` Sam Vilain
2007-03-20  0:49                 ` Junio C Hamano
2007-03-20  0:54                   ` Junio C Hamano
2007-03-19  3:33           ` Theodore Tso
2007-03-19  3:47             ` Shawn O. Pearce
2007-03-19  4:14               ` Junio C Hamano
2007-03-19  9:19   ` Matthieu Moy [this message]
2007-03-19 10:01     ` Jakub Narebski
2007-03-21 17:20     ` Neil Schemenauer
2007-03-19 12:44 ` Sergio Callegari

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=vpq8xdtpp3g.fsf@olympe.imag.fr \
    --to=matthieu.moy@imag$(echo .)fr \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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