From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: fetch and pull Date: Fri, 06 Mar 2009 12:49:56 -0800 Message-ID: <7vd4cus7ez.fsf@gitster.siamese.dyndns.org> References: <450196A1AAAE4B42A00A8B27A59278E70A115E0D@EXCHANGE.trad.tradestation.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "John Dlugosz" , To: Jakub Narebski X-From: git-owner@vger.kernel.org Fri Mar 06 21:51:42 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lfh14-0001Cw-Vt for gcvg-git-2@gmane.org; Fri, 06 Mar 2009 21:51:35 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755281AbZCFUuH (ORCPT ); Fri, 6 Mar 2009 15:50:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755132AbZCFUuG (ORCPT ); Fri, 6 Mar 2009 15:50:06 -0500 Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:51137 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755055AbZCFUuF (ORCPT ); Fri, 6 Mar 2009 15:50:05 -0500 Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 0B704245F; Fri, 6 Mar 2009 15:50:03 -0500 (EST) Received: from pobox.com (unknown [68.225.240.211]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 4F371245E; Fri, 6 Mar 2009 15:49:58 -0500 (EST) In-Reply-To: (Jakub Narebski's message of "Fri, 06 Mar 2009 12:44:49 -0800 (PST)") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Pobox-Relay-ID: 5DA52404-0A90-11DE-A8B2-CBE7E3B37BAC-77302942!a-sasl-quonix.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Jakub Narebski writes: > "John Dlugosz" writes: > >> So, after inspecting the changes, how do you fast-forward your local dev >> to sync up with origin/dev? >> >> I'm worried that >> >> git pull origin dev >> >> will try to merge into the current head. The documentation indicates >> "The remote ref that matches is fetched, and if is not empty >> string, the local ref that matches it is fast forwarded using ." >> which is what I want, but it does NOT say that the normal behavior of >> merging origin/dev into the =current= HEAD, if it happens to not be the >> local dev. >> >> So, does it indeed suppress that behavior if you give it an explicit >> destination? Or will I have to checkout dev first before doing the >> pull, to prevent strange things from happening? Hmm, or perhaps I >> should be using merge, not pull? After all, pull is really just a >> wrapper around fetch and then merge, right? So is it OK to call merge >> when I really want to fast-forward, and is there an option to give an >> error if it isn't ff? > > There was patch series adding support --ff=only, but I think it didn't > made into git... Hmmm... I do not think it has much to do with the main point of what John wants to do which is to muck with local branch without checking it out, which is only possible when it happens to fast forward to the new tip of the corresponding branch obtained from the the remote.