From dev-return-198419-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Thu Apr 25 18:43:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id ED530180638 for ; Thu, 25 Apr 2019 20:43:01 +0200 (CEST) Received: (qmail 80830 invoked by uid 500); 25 Apr 2019 18:42:57 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 80820 invoked by uid 99); 25 Apr 2019 18:42:57 -0000 Received: from Unknown (HELO mailrelay1-lw-us.apache.org) (10.10.3.159) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2019 18:42:57 +0000 Received: from [192.168.1.101] (45-19-167-161.lightspeed.irvnca.sbcglobal.net [45.19.167.161]) by mailrelay1-lw-us.apache.org (ASF Mail Server at mailrelay1-lw-us.apache.org) with ESMTPSA id 400AF12E2 for ; Thu, 25 Apr 2019 18:42:57 +0000 (UTC) Subject: Re: Finally getting around to switching to Git To: dev@tomcat.apache.org References: <869c76ca-a925-8bc0-bc80-7c33fc0016c4@christopherschultz.net> <03f9d16b-4a12-8ae2-15a0-1576e2c0ef78@christopherschultz.net> <250b614f-783a-bc88-0912-7e08945654bd@apache.org> <2a156b3e-4b03-5618-b601-b0ebaf240f35@apache.org> From: Igal Sapir Organization: Apache Software Foundation Message-ID: <7df48ac6-f505-be7b-6c86-d35faa83d6bf@apache.org> Date: Thu, 25 Apr 2019 11:42:55 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Coty, On 4/25/2019 11:30 AM, Coty Sutherland wrote: > On Thu, Apr 25, 2019 at 2:06 PM Igal Sapir wrote: > >> On 4/25/2019 10:56 AM, Coty Sutherland wrote: >>> On Thu, Apr 25, 2019 at 1:32 PM Christopher Schultz < >>> chris@christopherschultz.net> wrote: >>> >>>> -----BEGIN PGP SIGNED MESSAGE----- >>>> Hash: SHA256 >>>> >>>> Igal, >>>> >>>> On 4/23/19 12:52, Igal Sapir wrote: >>>>> Another thing that I have changed in my workflow based on Mark's >>>>> past suggestion, is that I keep a local repo for each major branch >>>>> now. >>>> Okay, I have done the following: >>>> >>>> 1. Fork tomcat master to my own GitHub account >>>> 2. git clone URL >>>> 3. edit/add/commit/push >>>> 4. Create a PR >>>> >>>> I'm sure I can import the PR into tomcat-master. No problem. >>>> >>>> Now, when attempting to keep my fork current, I've always done >>>> something like: >>>> >>>> git remote add upstream master-url >>>> git checkout master >>>> git fetch upstream >>>> >>>> And I'm all up-to-date. >>>> >>>> When I did that, I ended up bringing-down the 7.0.x and 8.5.x branches >>>> as well. How can I limit the upstream to just the master? >>>> >>> You can set the branch for your remote to master (or do it when you >> clone) >>> which should ignore other branches: >>> git remote set-branches upstream master >>> >>> Then optionally configure --no-tags in your git config (or use --no-tags >>> each time you git-fetch): >>> git config --add remote.upstream.tagOpt --no-tags >>> >>> Then try fetching to verify it worked: >>> git fetch upstream [--dry-run] >>> >>> >>>> Or does my fork have to have everything, but I have to checkout a >>>> single branch? If so, I'm not sure how to do that. >>>> >>> It doesn't, but by default a `git fetch` pulls down all new work that >>> exists on the remote, but not your local clone. >> I am sure that Coty knows git better than I do, so if he says that it >> doesn't then I stand corrected. >> > I don't know about that :) If you do a regular `git clone apache/tomcat` it > will pull the master branch and then references/histories for all remote > branches which for tomcat is about a 100M .git directory. If you clone a > single branch with no references such as `git clone apache/tomcat -b master > --single-branch` then you get just the references/history for the master > branch which results in about a 70M .git directory. So one needs to consider whether that added layer of complexity is worth the savings of 30M disk space, even when multiplied over 3 branches.  Imagine the reclaimed space after deleting the local SVN directories ;) I think that working with the https://github.com/apache/tomcat as the origin will make things much easier for Chris.  Especially with keeping the local repo up to date with the origin since he wouldn't need to use his fork. Best, Igal --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org