git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git beginner - Need help understanding

From
Dov Grobgeld <dov.grobgeld@gmail.com>
Date
Dec 27, 2011, 06:34 UTC
Message-ID
<CA++fsGHPKhzfd7-KohOZ4WpYatx_-EW0bjq46zwswbu8TomHCg@mail.gmail.com>
In-Reply-To
<CA++fsGGEv=jS4YNEUCxTwZ3pZc7HbbmoPbDH+MamrqamxrsADA@mail.gmail.com>

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
 On Tue, Dec 27, 2011 at 05:12, chirin <takonatto@gmail.com> wrote:
Show 23 quoted lines
>
> I'm just beginning to use Git in my workplace, and (rather shamefully) have
> never heard of Git until now. While I pore over the stacks of documentations
> for beginners, could someone help me understand this issue I've been having?
>
> Every time a colleague updates a file, I would not be able to pull due to
> merge conflicts - even though I have never made any changes to the
> repository. I'd try  and then  again, but it would still give the same merge
> conflict. The only way I could pull currently is to do a git commit (even
> without changes), and then git pull.
>
> If this was SVN, I could simply resolve this with Update. What am I missing,
> and what should I be looking for?
>
> Thanks in advance..
>
> --
> View this message in context: http://git.661346.n2.nabble.com/Git-beginner-Need-help-understanding-tp7129186p7129186.html
> Sent from the git mailing list archive at Nabble.com.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: chirinNext: chirin
Message 2 of 6 in “Git beginner - Need help understanding”
  1. chirinDec 27, 2011
  2. Dov GrobgeldDec 27, 2011
  3. chirinDec 27, 2011
  4. Junio C HamanoDec 27, 2011
  5. chirinDec 28, 2011
  6. Dov GrobgeldDec 28, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.