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

Re: Question re. git remote repository

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 18, 2013, 21:38 UTC
Message-ID
<7v1udiqiic.fsf@alter.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.2.02.1301181320070.21503@nftneq.ynat.uz>
David Lang <david@lang.hm> writes:
Show 12 quoted lines
> On Fri, 18 Jan 2013, Junio C Hamano wrote:
>
>> David Lang <david@lang.hm> writes:
>> ...
>>> developers then do their work locally, and after a change has been
>>> reviewed, pull it into the master repository.
>>
>> s/pull it into/push it into/; I think.
>
> fair enough, I always think in terms of pulling from feature branches
> into the main repository so that any merge conflicts get resolved. I
> didn't describe this clearly enough.

If you are assuming that the "main repository" has a working tree and somebody goes there, runs "git pull" and manually resolves conflicts, that may be asking for trouble down the road. It may be sufficient for two-person group as long as they coordinate among themselves so that only one of them uses that working tree at the "main repository" at a time.

But in general, it is more common to have a bare repository without any working tree as the "main repository", let a push that conflicts fail, and have the pusher fetch from the "main repository" and fix up the conflicts in his working repository before he tries to push the cleaned-up result. That gives the pusher a chance to re-test the result of integration with what he did not see while he was developing what he attempted to push.

"pull" and "pull -rebase" are two ways to do that "fetch from the 'main' and fix up" step.

Previous: David LangNext: Philip Oakley
Message 20 of 21 in “Question re. git remote repository”
  1. Lang, DavidJan 16, 2013
  2. Konstantin KhomoutovJan 16, 2013
  3. Jeff KingJan 16, 2013
  4. Konstantin KhomoutovJan 16, 2013
  5. Stephen SmithJan 16, 2013
  6. David LangJan 16, 2013
  7. Lang, DavidJan 17, 2013
  8. Matt SeitzJan 18, 2013
  9. David LangJan 18, 2013
  10. Lang, DavidJan 18, 2013
  11. Matt SeitzJan 18, 2013
  12. Lang, DavidJan 23, 2013
  13. Junio C HamanoJan 23, 2013
  14. Jeff KingJan 17, 2013
  15. David LangJan 16, 2013
  16. David LangJan 17, 2013
  17. David LangJan 18, 2013
  18. Junio C HamanoJan 18, 2013
  19. David LangJan 18, 2013
  20. Junio C HamanoJan 18, 2013
  21. Philip OakleyJan 18, 2013

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.