[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git commit/push and VC

From: Stephen J. Turnbull
Subject: Re: git commit/push and VC
Date: Sat, 22 Nov 2014 16:25:51 +0900

Ivan Shmakov writes:
 > >>>>> Stephen J Turnbull <address@hidden> writes:
 > […]
 >  > Technically speaking, it's not possible in git to merge between
 >  > clones, you have to fetch and then merge (== pull).
 >      Not necessarily, – you can just as well add the Git (or, rather,
 >      .git/objects) directory of your “other” clone to your current’s
 >      .git/objects/info/alternates, which will make the other clone’s
 >      commits available for any operation – including merge – on the
 >      current one.

OK, it's possible to avoid the copy/linking operations of fetch, but
you still need to do the merge in the current repo (and typically pull
the ref from the other repo).  There are also reasons why using
alternates is not necessarily great (especially for new users) -- eg,
it means that rebase, commit --amend, filter-branch, and so on can
corrupt the dependent repo.

It's somewhat beside the point, but I don't consider the physical
location of objects in the DAG particularly interesting.  fetch is
usually very cheap even over the network -- one hardly notices it
unless one distrusts coworkers enough to insist on a fetch-review-
merge workflow instead of a pull workflow.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]