From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel Subject: Re: git question Date: Wed, 27 Jun 2018 23:29:53 +0900 Message-ID: <25CA8208-3609-421D-867F-6F69B706B27B@gmail.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_8A905D85-681B-421D-9607-9CE0F2A0C56F" X-Trace: blaine.gmane.org 1530109748 25863 195.159.176.226 (27 Jun 2018 14:29:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2018 14:29:08 +0000 (UTC) Cc: Emacs developers To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 27 16:29:04 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYBRP-0006dp-T8 for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2018 16:29:04 +0200 Original-Received: from localhost ([::1]:59657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYBTX-0006V1-A8 for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2018 10:31:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYBSN-0006Ss-TY for emacs-devel@gnu.org; Wed, 27 Jun 2018 10:30:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYBSI-0004cH-RX for emacs-devel@gnu.org; Wed, 27 Jun 2018 10:30:03 -0400 Original-Received: from mail-pg0-x230.google.com ([2607:f8b0:400e:c05::230]:39268) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYBSI-0004c1-IO for emacs-devel@gnu.org; Wed, 27 Jun 2018 10:29:58 -0400 Original-Received: by mail-pg0-x230.google.com with SMTP id n2-v6so1002372pgq.6 for ; Wed, 27 Jun 2018 07:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=/dJC4pQjQiFJM+rZyJszxhATw3DGH4yZNE55PR1fodU=; b=juadtDCBUN+VecViRrm8iNu+EnQAhrXrPTSjsmAe634RmQqTvhbRz2A1u8yRfVmqP5 W/VHER+io8pr3ueNzbjgvOOJe+6kh2EHQ9S5GLox1sMKVdeIhfGaNcl1ZBPeTFtxwz1f vb6k0SSVfVJuDPGytkVeK8cGlJjxTknz8ikDZ/r7VtYpvpQxF10RNPwUFTaO1lGCjgSE 16hIoX8YwoHL03uGmEkDCZhFl6AIO1grcECrmlHljFqUOG7UYJRgz4ll9OLQBN/qlXk5 Ym3ndyV63Es7CgiOkUmhyhOP+5vpOuxXofSvPDm+pLVgNet4Uk5rMXTRkjq6l7YB1NhD 4TGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=/dJC4pQjQiFJM+rZyJszxhATw3DGH4yZNE55PR1fodU=; b=J8i0/2bEFs7Cg/sKobNXSH3sTX8erSnmAD2PuSxI6YvlVoHBWCFfeV7mitqmWPjUHu 4ErD0LUiOvJYtf3mbGf0ApFA+/Jo1+6Pjd9l0Aqjlu33NEaa4vj+gcB0rDz0f4XpeEwK 4C9AAjxUZpG6YxfUKJ4CeEHLgtEg01ffYRq5fz1qug4Ma7vWybF/4CiQIPP4wzXxV0/V t9FMh13pKG4v3IcxgctCUbFXG4+wWWpDxinnjpD9LEJM1472nwmtW48NmRqt5yY5cPAY vu3IBlFsNqga1v+HN9yJoyjJpx5tDO7LUDQDa9iNaUQ7DT8fsF4kgY66mtovwaxvQUfx oSug== X-Gm-Message-State: APt69E2RWHd8E1oCpBrlLh+LJz9c+KcQcevzRzjcQvQaGaVjJvltCSG9 x8g9DLVGfi3OWhbERGRkc74= X-Google-Smtp-Source: ADUXVKILZPVj4t0J5xaZzMdetd239FVuSOXVuFCBmkUShZMenQEiDTR4YByudMOXH1SGTYlaHVch2A== X-Received: by 2002:a63:aa4c:: with SMTP id x12-v6mr5222862pgo.387.1530109797766; Wed, 27 Jun 2018 07:29:57 -0700 (PDT) Original-Received: from [192.168.1.7] (pl31219.ag0304.nttpc.ne.jp. [111.89.224.243]) by smtp.gmail.com with ESMTPSA id y3-v6sm9566307pge.29.2018.06.27.07.29.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 07:29:56 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3445.8.2) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226773 Archived-At: --Apple-Mail=_8A905D85-681B-421D-9607-9CE0F2A0C56F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 27, 2018, at 23:23, Yuri Khan wrote: >=20 > On Wed, Jun 27, 2018 at 9:03 PM Jean-Christophe Helary > wrote: >=20 >> When I do a git pull and I get, for ex: >>=20 >> etc/NEWS | 6 ++++++ >> lisp/info.el | 4 ++-- >> lisp/server.el | 10 ++++++---- >>=20 >> like I just had. >>=20 >> What git command should I use to examine what are the modifications = on the three above files? >=20 > Normally you would first do a =E2=80=9Cgit fetch=E2=80=9D, then see = the diff between > current state and the remote branch, and only then decide if you want > to merge that: :) I trust the commiters to only commit proper code. I'm just curious = about some files sometimes. But thank you for the hint ! > $ git fetch > $ git diff HEAD..origin/master > $ git merge origin/master >=20 > (substitute a different remote branch name as necessary). >=20 > But if you did a blind pull already, you can look back this way: >=20 > $ git diff HEAD@{1}.. Thank you, and thank you Andreas for the same reply. Now, if I want to only check 1 file out of the multiple files that have = been commited ? Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune --Apple-Mail=_8A905D85-681B-421D-9607-9CE0F2A0C56F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Jun 27, 2018, at 23:23, Yuri Khan <yurivkhan@gmail.com>= wrote:

On Wed, Jun 27, 2018 at 9:03 PM Jean-Christophe Helary
<brandelune@gmail.com> wrote:

When I do a git pull and = I get, for ex:

etc/NEWS =       |  6 ++++++
= lisp/info.el   |  4 ++--
lisp/server.el | = 10 ++++++----

like I just had.

What git command should I use to examine what = are the modifications on the three above files?

Normally you would first do a = =E2=80=9Cgit fetch=E2=80=9D, then see the diff between
current state and the remote branch, and only then decide if = you want
to merge that:

:) I = trust the commiters to only commit proper code. I'm just curious about = some files sometimes.
But thank you for the hint !

$ git fetch
$ git diff HEAD..origin/master
$ git merge origin/master

(substitute a different remote branch name as necessary).

But if you did a blind pull already, you can = look back this way:

$ git diff = HEAD@{1}..

Thank you, and thank you Andreas for the same = reply.

Now, if I want to only check = 1 file out of the multiple files that have been commited ?


Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune


= --Apple-Mail=_8A905D85-681B-421D-9607-9CE0F2A0C56F--