Re: Unexpected behavior with branch.*.{remote,pushremote,merge}

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

 



"Ben Denhartog" <ben@xxxxxxxxxxxxx> writes:

> To the rest of your message:
>
> I did not understand the behavior of `fetch --all`; what you've
> described makes sense to me (although I would agree that it sounds
> like there's a bug). Between the following steps I'll take, I
> think my fork workflow is "fixed":
>
> * Refactor away from usage of FETCH_HEAD

Yes, "fetch --all" is about updating the remote-tracking branches
and in retrospect, perhaps we might have avoided confusion if we
made it not to touch FETCH_HEAD, but it is not going to change now.

> * Set `remote.pushdefault = origin`
> * Set `push.default = current` (instead of `simple`, and is what
> my global config sets this to)

I have a feeling that simple vs current does not make a difference
if you are pusing main to main, and if so, push.default could be
left to the default settings of 'simple'.  But the key to successful
use of the triangular workflow is to configure so that "fetch/pull"
goes to one place (i.e. your upstream) and "push" goes to another
(i.e. your publishing repository), and "remote.pushdefault" is a
good ingredient to do so.

It is however more common to use 'origin' as the name of your
upstream repository (so that "git fetch" and "git pull" would grab
things from there by default) and set remote.pushdefault to the
remote you push into, though (iow, I found remote.pushdefault
pointing at 'origin' a bit unusual).  Doing so may make your
triangular workflow work smoother.

> I appreciate your insight and the identification of the problem.

Thanks for a concluding comment to report a success.  It's
reassuring to hear a positive feedback.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux