From patchwork Mon May 4 05:42:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11525043 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 372B5912 for ; Mon, 4 May 2020 05:42:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 202C120735 for ; Mon, 4 May 2020 05:42:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qxZWpjIP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726743AbgEDFmd (ORCPT ); Mon, 4 May 2020 01:42:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgEDFmd (ORCPT ); Mon, 4 May 2020 01:42:33 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 501DFC061A0E for ; Sun, 3 May 2020 22:42:33 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id hi11so3296598pjb.3 for ; Sun, 03 May 2020 22:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oLJr6sow8XRffqwXDnsy/n9IXJ73EI6kLpfmNNuAQ/0=; b=qxZWpjIPDG53TvC7Kr1QECp0AKa9Vx2Vm0JxjCmL0T7AnaVlkxzLKRFZEa5y+MCoHy otCxLiHIcMQe5Tp5kQd2zj6i7L65aCcAe5d2xOHX7HnN9Jj3JdBCiH8xgkve8SLaf6XO nXwHuei0/PEfSAZxniDiTjxYr2rkD91BmoNty901tx1xegTxyScRPP38uhK/pTK8qmz1 +ASITq9uWi0Ey4tXKWRqsWDmIOPs1C6sI1jZfMoOiOgTdLDwd9tU+fzIUm9I1xehwPfP CQStHINj1N6BYIhrWAK9ReTWwh15ssDWbfj7QyOmiFohyAd1MQZ42/p8tMbEFz7pNx7T HHmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oLJr6sow8XRffqwXDnsy/n9IXJ73EI6kLpfmNNuAQ/0=; b=pw6mhFNtTCzfZdHZsAiJqnIoh+nbMPKuXusOH9kXlKNyztjSnd8kv4f/IwVLr18WVV 6upsQeDPYsghMsbtTCG0uSt8S5YaFZAE8Ylx7KyFDEHj85Fs/IGUsL1yw8pVXcD55tGD 3u5aRhQANY1zHXF3KGbXkmFnFzfHC4dk7vseFaYW4sdRMcOmTN7V/x3Vhc7/xmZRicrd 3+gkgjz0Dq8wJYYBO3ibYMEOebQgBKI1hc+EhtBH4OXeiKQ23+yf1PNYMDncTNqQ1a7s CroZ5ZCGncroyaWe+hBYmhhuK4TlXErDD+/ADb0QRShDm3hf7dG9Q4eoZ5OUb+rki8dT xrEQ== X-Gm-Message-State: AGi0PuZeUm83lFp920uvbk3EXSG5fGgswEihHnVA1PV71LMEyBGY0Ome Yvo8MooaBxJ7Dk0mYQgllCCE4TatG9c= X-Google-Smtp-Source: APiQypIkZJq4OsLjkk5fc9YjD+m1eed/OMtAbaGyQVRmuZ1JfhO8ES7aU4ed3PMP9awOPqXObzuDYg== X-Received: by 2002:a17:90a:a414:: with SMTP id y20mr15516673pjp.45.1588570952181; Sun, 03 May 2020 22:42:32 -0700 (PDT) Received: from konoha.iitr.ac.in ([103.37.201.176]) by smtp.gmail.com with ESMTPSA id 189sm7850785pfd.55.2020.05.03.22.42.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2020 22:42:31 -0700 (PDT) From: Shourya Shukla To: git@vger.kernel.org Cc: gitster@pobox.com, sandals@crustytoothpaste.net, newren@gmail.com, Shourya Shukla Subject: [PATCH v5 1/4] gitfaq: files in .gitignore are tracked Date: Mon, 4 May 2020 11:12:20 +0530 Message-Id: <20200504054223.11125-1-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add issue in 'Common Issues' section which addresses the problem of Git tracking files/paths mentioned in '.gitignore'. Signed-off-by: Shourya Shukla --- Thank you Junio and Elijah for the review! :) I have tried to make the solutions to the issues as concise and crisp as possible, linking the Documentation wherever necessary. Also, I have converted 1SP -> 2 SP after full stops(.). Documentation/gitfaq.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt index 1cf83df118..11d9bac859 100644 --- a/Documentation/gitfaq.txt +++ b/Documentation/gitfaq.txt @@ -223,6 +223,16 @@ a file checked into the repository which is a template or set of defaults which can then be copied alongside and modified as appropriate. This second, modified file is usually ignored to prevent accidentally committing it. +[[files-in-.gitignore-are-tracked]] +I asked Git to ignore various files, yet they are still tracked:: + A `gitignore` file ensures that certain file(s) which are not + tracked by Git remain untracked. However, sometimes particular + file(s) may have been tracked before adding them into the + `.gitignore`, hence they still remain tracked. To untrack and + ignore files/patterns, use `git rm --cached ` + and add a pattern to `.gitignore` that matches the . + See linkgit:gitignore[5] for details. + Hooks ----- From patchwork Mon May 4 05:42:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11525045 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52E49139A for ; Mon, 4 May 2020 05:42:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3BFD920735 for ; Mon, 4 May 2020 05:42:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pHPsjr7P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726915AbgEDFmg (ORCPT ); Mon, 4 May 2020 01:42:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgEDFmg (ORCPT ); Mon, 4 May 2020 01:42:36 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D2DFC061A0E for ; Sun, 3 May 2020 22:42:36 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id w3so6362970plz.5 for ; Sun, 03 May 2020 22:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HL2n4lZj2wcpnouSt9BP2Xi3Qb9iXbCROFPe7Fg3N50=; b=pHPsjr7PaJt4noy9RhqzX2J0YSmsqQRXCPjJUyvkDHoYzv6VtkaX1k2xA37JObB7sH 30AX0V8rHgG5IPi8nC30tdCvs/nvC5IEmKPxSSYUlOBz9BZYKnV/65dElvjuyTxoaS9w td8oy7CiiUsGpMuHrRydK5gjWzXVs0uH3T2pvITRoWnRTGG+r19mp37NU+1lkjAFXb56 sX3yZo8YMdPIpbP2wX319WAGmKltmkAKVUXelQjHiXX0Mr8XsO4r7389TnjLqfN3dOW4 cBrlh9UTKJhwNhpRFrAZ8V+Bjgt/+6+yHDGp+RFtdDStxPK1KwgEknqH/89VrSq7rnti FRYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HL2n4lZj2wcpnouSt9BP2Xi3Qb9iXbCROFPe7Fg3N50=; b=tjWmReUdIbpl5Tm2ldlD5JepxBZ4EnT0ZSPoFoDqcRUz5LeGy0kz2VjD6bnMvijABO 9Qj+r2HlD6/2fU+zub+C5xYT7bLsyBHxVhrn9III5Orm1Z0UA/CL6toZ1BddcShSayiB 0z7yeVpM3h4KzbFbajKKvuNceowrwAQ6Tz/V192TQgXZFNiR6YkgIgbB2cMQA37NZsvL CfiOG9DLxDkXFTTKNm/Ex2iiPY4CKYHdg3H2J10MQt0vFCFbN9Wa7Pj8pcftS08QzETS ClDHh1zmulH5Tz3YJqo1YV5WoLj8c9LBzKC8iaZvBJ8x9DtnF28jElpIL3nmEsqBYKw9 KZPg== X-Gm-Message-State: AGi0PuYD0C32p/NJUOzUnwZ90deKSGzem5yc3uL7FbPNqIOWGq6yh7JO 3C52PQ0KpmT0oNvJhPVlR/tAbzo5h00= X-Google-Smtp-Source: APiQypKSQM17KbZFbxGxIJp7VOWQ0TcDuEkbJxkZdozzls2BPztG+lbsYwghlYE4ICgPcxKYs+9f2w== X-Received: by 2002:a17:90a:37c4:: with SMTP id v62mr14588855pjb.177.1588570955237; Sun, 03 May 2020 22:42:35 -0700 (PDT) Received: from konoha.iitr.ac.in ([103.37.201.176]) by smtp.gmail.com with ESMTPSA id 189sm7850785pfd.55.2020.05.03.22.42.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2020 22:42:34 -0700 (PDT) From: Shourya Shukla To: git@vger.kernel.org Cc: gitster@pobox.com, sandals@crustytoothpaste.net, newren@gmail.com, Shourya Shukla Subject: [PATCH v5 2/4] gitfaq: changing the remote of a repository Date: Mon, 4 May 2020 11:12:21 +0530 Message-Id: <20200504054223.11125-2-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200504054223.11125-1-shouryashukla.oo@gmail.com> References: <20200504054223.11125-1-shouryashukla.oo@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add issue in 'Common Issues' section which addresses the problem of changing the remote of a repository, covering various cases in which one might want to change the remote and the ways to do the same. Signed-off-by: Shourya Shukla --- Documentation/gitfaq.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt index 11d9bac859..875cfa0acd 100644 --- a/Documentation/gitfaq.txt +++ b/Documentation/gitfaq.txt @@ -233,6 +233,17 @@ I asked Git to ignore various files, yet they are still tracked:: and add a pattern to `.gitignore` that matches the . See linkgit:gitignore[5] for details. +[[changing-remote-of-the-repository]] +I want to change the remote of my repository. How do I do that?:: + A remote is an identifier for a location to which Git pushes your + changes as well as fetches any new changes from (if any). There + might be different circumstances in which one might need to change + the remote URL (see linkgit:git-remote[1]). To change the remote URL + one may use: git remote set-url ++ +One can list the remotes of a repository using `git remote -v` command. +The default name of a remote is 'origin'. + Hooks ----- From patchwork Mon May 4 05:42:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11525047 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F0B21668 for ; Mon, 4 May 2020 05:42:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 579AB20735 for ; Mon, 4 May 2020 05:42:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SLFbXqcU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726950AbgEDFml (ORCPT ); Mon, 4 May 2020 01:42:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgEDFmk (ORCPT ); Mon, 4 May 2020 01:42:40 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EFAAC061A0E for ; Sun, 3 May 2020 22:42:39 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id mq3so3304575pjb.1 for ; Sun, 03 May 2020 22:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o8ff2N3sr1fs7jVoQVJGJadL6klt2nXG+Q+DS0Bnzxo=; b=SLFbXqcUx6uojmV1WISsVoO6lh/6mJIsV1vd3/W8dm2AenHtCk4Jjspl7PxhabzVXf U12g33r/z/jk6NTjD5PNpk1fIY0B+0rZxhFLwc1ksYW9ZGJZrWgENBxUPmYMOh8PFH7W 3f0ZIfdy9ulA2+puite40iUI/G1ip9/X1cURKqhSMaczdfDTE/aLaV/rieLOQpHHbQHa j05ChGV3p/6eC71ipRZTvU8t8iD5CCWdzfDtgpKOyWtFnHF6maelafIC0QC70yre3G66 nGVofU8sK3r0FkjNHR9dYSkC/6/+rr8ysc7ATkiPAn0zonKl93FjjLuM3QOUtQvIMAUO YkRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o8ff2N3sr1fs7jVoQVJGJadL6klt2nXG+Q+DS0Bnzxo=; b=KHT9XbVFzKSRNZW9w5cmBAwYLVajunJoo1H/2Kjpp6oWPh8Et0CHygNePKgjpWEaw3 j9mCUv6LS+O2GcdgtTp1iRQewYaRuIa6/yvEKRZcT2KA2K6qfM1zmtEPURe6VhZ/2Vss 7tSJLln/inXBZQTxAJ6nyJ0J32UE65Gd7Qs0t40Ha2aVdmsbcQzRxUQCEvrV5y/tZXnp W2dohthf2ySQdoBSEigCpGjb33SQmDtAKx4EvtlopHLCcbvjupD/NERAhKJcOSH3e+1Q XAuiGcrMIV9u+R8H0OTgU94/w/pW0y5X9O1UA6+KPuzN930qzj+LCUDPdg96OddydoYJ U0ww== X-Gm-Message-State: AGi0PuZiiwvE4DKAOtfSETW6b5Bri9QJ9tlvqkSA9YYmVwt6dZyjFq2D d6Wt1KV62AWwX5r1GUjtHSUZ4+V1Cpg= X-Google-Smtp-Source: APiQypLYeQrbgDhBMU4nE1F6ExQRX+e9+NRTu2x1c4+vLgPRrXTJUbDXRNjASdvUvp71cLAkGSEPOg== X-Received: by 2002:a17:90a:bd91:: with SMTP id z17mr16112453pjr.189.1588570958291; Sun, 03 May 2020 22:42:38 -0700 (PDT) Received: from konoha.iitr.ac.in ([103.37.201.176]) by smtp.gmail.com with ESMTPSA id 189sm7850785pfd.55.2020.05.03.22.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2020 22:42:37 -0700 (PDT) From: Shourya Shukla To: git@vger.kernel.org Cc: gitster@pobox.com, sandals@crustytoothpaste.net, newren@gmail.com, Shourya Shukla Subject: [PATCH v5 3/4] gitfaq: shallow cloning a repository Date: Mon, 4 May 2020 11:12:22 +0530 Message-Id: <20200504054223.11125-3-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200504054223.11125-1-shouryashukla.oo@gmail.com> References: <20200504054223.11125-1-shouryashukla.oo@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add issue in 'Common issue' section which covers issues with cloning large repositories. Use partial cloning to selectively clone the repository. Signed-off-by: Shourya Shukla --- I fixed the heading of this section and improved it overall though, as pointed out by Junio, there is a bit confusion as to what URL I am trying to point to: https://git-scm.com/docs/partial-clone This is the URL I want to point to. Documentation/gitfaq.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt index 875cfa0acd..5dfbb32089 100644 --- a/Documentation/gitfaq.txt +++ b/Documentation/gitfaq.txt @@ -244,6 +244,17 @@ I want to change the remote of my repository. How do I do that?:: One can list the remotes of a repository using `git remote -v` command. The default name of a remote is 'origin'. +[[partial-cloning]] +The repository I am trying to clone is too big. Is there an alternative +way of cloning it in lesser space?:: + A good way to save space when cloning a repository is by using + `partial clones`. A partial clone will clone the full history of + the repository but will skip out the entities specified by the + `--filter` option one uses in `git clone`. Any entity which has + not been cloned to save space can be cloned on-demand (hence this + presumes that the user has an always-on network connection to the + original repository). See linkgit:partial-clone[1]. + Hooks ----- From patchwork Mon May 4 05:42:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11525049 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A91D18A4 for ; Mon, 4 May 2020 05:42:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 738E420643 for ; Mon, 4 May 2020 05:42:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FH9PInRH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbgEDFmn (ORCPT ); Mon, 4 May 2020 01:42:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgEDFmm (ORCPT ); Mon, 4 May 2020 01:42:42 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46896C061A0E for ; Sun, 3 May 2020 22:42:42 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id t9so3300703pjw.0 for ; Sun, 03 May 2020 22:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ERi6DVrztVOelH96Vv9qKCzrU1bwPaK3h/kcUTy+X3s=; b=FH9PInRHXG/sNedk4rT7FqRcyCVo8HRmjfGhnDIVOXz4zoEhafD8LgP7gVRfnz4DWs YGC+MIOO4az8R6bjiY5W/xX+NQTH2o4BP5ESxdy89apCK99aB0/OWwimdWy+bAcMzKr1 RK10Jf5EBYLF/PTngqnEu3jraZDZxjxCXXzhCi8vE0Ovy4oiq4mtc/6oLXag2aAPwBvB LBBt3efFA1ZT6gAnLjJHgD/dSb800JcYzSh3SYpsKYVPFRoYLp/6nJBr1eWVaYfWxqaz Q/fabtHaBuiRFLKEGZyG0eAkv7JzA9M17KhFenlCaOOugTjc2JKHDOluheKxA21rVmqL lbQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ERi6DVrztVOelH96Vv9qKCzrU1bwPaK3h/kcUTy+X3s=; b=ErJuLDQOZBHXfqa1D/A0Y4CrRZBZ4ivU0SNF5m3o3pGoyt6bgKa9eUFvuX8Gup6xqA 9IWY8WSfdz3onRQrSszSpEog1HIyxWhXwTO+Yblrv8WMU4BuyNaraEQGxaqSGY7Go2B9 M7nBtC4nuG99BqBwAOZaWTmWIRWutwnXvndU/nn2z/qwfJOBCqDzYrega64TN5GDH8AS 8PIUWFJN50FkdXTWnANRl1CigK6rdD4ytb1mMjeIsXKfSc8Ed0Ibb9MgnNTlpEaj1TeX iUbH92XrUzmWEkDgwLSuwNxBufdbItpgO0RrcSOInZgvip32aIcnT2d/J//AyAR95AMI wlFg== X-Gm-Message-State: AGi0PuYsH81cmVsIRS6KS+ThfIWJhC8p7kf74am7WtGlC4AHT2dnQz7w 80Jp/InW9m78PTgro6Xr/1A12FwOHJo= X-Google-Smtp-Source: APiQypKtO9mIgZtEiFQ79SHIqGAIvVHFoMFY5FFM4CYk7+d0PSs4Ym+a6Ur2LimFbZTXesZvSeJ9yg== X-Received: by 2002:a17:902:7596:: with SMTP id j22mr14971285pll.226.1588570961346; Sun, 03 May 2020 22:42:41 -0700 (PDT) Received: from konoha.iitr.ac.in ([103.37.201.176]) by smtp.gmail.com with ESMTPSA id 189sm7850785pfd.55.2020.05.03.22.42.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2020 22:42:40 -0700 (PDT) From: Shourya Shukla To: git@vger.kernel.org Cc: gitster@pobox.com, sandals@crustytoothpaste.net, newren@gmail.com, Shourya Shukla Subject: [PATCH v5 4/4] gitfaq: fetching and pulling a repository Date: Mon, 4 May 2020 11:12:23 +0530 Message-Id: <20200504054223.11125-4-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200504054223.11125-1-shouryashukla.oo@gmail.com> References: <20200504054223.11125-1-shouryashukla.oo@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add an issue in 'Common Issues' section which addresses the confusion between performing a 'fetch' and a 'pull'. Signed-off-by: Shourya Shukla --- Documentation/gitfaq.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt index 5dfbb32089..04ea7be99f 100644 --- a/Documentation/gitfaq.txt +++ b/Documentation/gitfaq.txt @@ -255,6 +255,22 @@ way of cloning it in lesser space?:: presumes that the user has an always-on network connection to the original repository). See linkgit:partial-clone[1]. +[[fetching-and-pulling]] +How do I know if I want to do a fetch or a pull?:: + A fetch brings in the latest changes made upstream (i.e., the + remote repository we are working on) without modifying the current + branch or the working tree. This allows us to inspect + the changes made upstream and integrate all those changes (if + and only if we want to) or only cherry pick certain changes. + + A pull is a wrapper for a fetch and merge/rebase. This means that + doing a `git pull` will not only fetch the changes made upstream + but integrate them immediately with our current branch too. The + merge/rebase may go smoothly or have merge conflicts depending + on the case. Hence, a pull does not give the user a chance to + review changes before applying them to their local repository/current + branch. + Hooks -----