git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: chirin <takonatto@gmail.com>
To: git@vger.kernel.org
Subject: Re: Git beginner - Need help understanding
Date: Mon, 26 Dec 2011 23:02:52 -0800 (PST)	[thread overview]
Message-ID: <1324969372444-7129429.post@n2.nabble.com> (raw)
In-Reply-To: <CA++fsGHPKhzfd7-KohOZ4WpYatx_-EW0bjq46zwswbu8TomHCg@mail.gmail.com>

From what I understand, your scenario is exactly what I expect. Which is why
when I asked around my colleagues, no one was able to explain why I'm having
this issue.

As per your scenario:

    # A changes hello.txt

    # Going into B (who has not done anything to hello.txt)
    git pull --> merge conflict on hello.txt

    git commit
    git pull --> OK

Would going through Gerrit have anything to do with it? I've compared git
config -l with the others but they are the same (aside from
remote.origin.url which has our own gerrit userid).



Dov Grobgeld wrote
> 
> The best way of understanding and also of asking questions, is if you
> can reproduce the steps of exactly what you want and don't understand
> by a sequence of commands like so:
> 
>      # First create a bare repository
>      mkdir R
>      cd R
>      git init --bare .
> 
>      # Clone it into A
>      git clone R A
> 
>      # Clone it into B
>      git clone R B
> 
>      # Now start doing changes for A and B, pulling and pushing into R
>      cd A
>      echo "Change #1" > hello.txt
>      git add hello.txt
>      git commit -m 'Commit #1'
>      git push origin master
> 
>      # Get into B
>      cd ../B
>      git pull
>      echo "Change #2" >> hello.txt
>      git commit -a -m 'Commit #2'
>      git push
> 
>      # Get into A and pull the changes done by B
>      cd ../A
>      git pull
> 
> In this sequence, which fulfills the scenario that you described,
> there are no conflicts. So I suggest that you try to change the
> command sequence to illustrate what you don't understand and ask
> again.
> 
>  Regards,
>  Dov
> 

--
View this message in context: http://git.661346.n2.nabble.com/Git-beginner-Need-help-understanding-tp7129186p7129429.html
Sent from the git mailing list archive at Nabble.com.

  reply	other threads:[~2011-12-27  7:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-27  3:12 Git beginner - Need help understanding chirin
     [not found] ` <CA++fsGGEv=jS4YNEUCxTwZ3pZc7HbbmoPbDH+MamrqamxrsADA@mail.gmail.com>
2011-12-27  6:34   ` Dov Grobgeld
2011-12-27  7:02     ` chirin [this message]
2011-12-27 19:50       ` Junio C Hamano
2011-12-28  1:38         ` chirin
2011-12-28  8:05           ` Dov Grobgeld

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=1324969372444-7129429.post@n2.nabble.com \
    --to=takonatto@gmail.com \
    --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).