Return-Path: X-Original-To: apmail-accumulo-dev-archive@www.apache.org Delivered-To: apmail-accumulo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B7A310B8C for ; Mon, 18 Nov 2013 00:04:43 +0000 (UTC) Received: (qmail 33882 invoked by uid 500); 18 Nov 2013 00:04:43 -0000 Delivered-To: apmail-accumulo-dev-archive@accumulo.apache.org Received: (qmail 33853 invoked by uid 500); 18 Nov 2013 00:04:43 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 33845 invoked by uid 99); 18 Nov 2013 00:04:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Nov 2013 00:04:43 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.215.172] (HELO mail-ea0-f172.google.com) (209.85.215.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Nov 2013 00:04:37 +0000 Received: by mail-ea0-f172.google.com with SMTP id b11so64143eae.31 for ; Sun, 17 Nov 2013 16:04:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=V4/Ymp9/JRq55XeO1fCa/AXtXR1uPkSJ0Ame/dVQZPg=; b=ZHzq3JIzavl/NX3K2qHEeWiWwc6rJGIk6eBva9P2XHmwe16RpXNEZ1CJylf/nIVQcA /cA23TIrGMU6oxHweim1BOHjqptRVqSvkpHW9CNpCNsnosKV4oi0uW1YdF3o5jOaPFgC QeNpEPZB9hFWSvk1FELg2SLT/vcuh9gtZGSxThDTLEbg6OrsJk3AZH5mSbWLCmx6y+K7 H6otepKCRAfJkPKOju8zfUcbebHbvmIJ4iZrnUY/6ezXol1vn3jP3or6TaUnEeJtyoEW DDX+bWnGKEm6FvRBLhLB/cnMQ8QBZPMVIfZM52wnM9VpIiJUo7Z+EUu/CU69H9FYkfYz 9J/A== X-Gm-Message-State: ALoCoQl9xyPPlreTrDNE8jzdTPi1UQKa7ZpVqZAIUYkYUbTUnUUx9D3nPx/C3nl+GpnqeJ+sLCjk X-Received: by 10.15.81.129 with SMTP id x1mr10967eey.55.1384733056886; Sun, 17 Nov 2013 16:04:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.105.195 with HTTP; Sun, 17 Nov 2013 16:03:56 -0800 (PST) In-Reply-To: References: From: Sean Busbey Date: Sun, 17 Nov 2013 18:03:56 -0600 Message-ID: Subject: Re: Git question To: "dev@accumulo apache. org" Content-Type: multipart/alternative; boundary=089e01681420f6fcb904eb68498e X-Virus-Checked: Checked by ClamAV on apache.org --089e01681420f6fcb904eb68498e Content-Type: text/plain; charset=UTF-8 Hi Terry! 1. The short answer is no. the git commands present in our guide tell you to use "git commit -a", which is a short cut to saying "include all changed files in this commit." Its use is frowned upon in most of the coding communities I've been in, because it encourages thinking less about what you do or do not include in a given patch. 1. The long answer is normally, yes. Git differentiates between the files that are different in your working directory and the files you actually want included in a particular commit. The way you let it know is via the "git add" and "git rm" commands. You only use either of those commands when you're deciding what goes into a commit. If you "git add" a changed file and then change it some more you'll need to "git add" it again; only those changes present as of the last "git add" will be reflected in a commit. There's a decent intro to the mechanics of casual git use, it might help since that's similar to where you are now: http://try.github.io/levels/1/challenges/1 2. The version of the commit command shown presumes you have an editor configured. With the commit command listed in the git guide for Accumulo, git will use your editor to ask you for a commit message. I think out of the box the editor will be vim, but whatever is configured for $EDITOR in your shell should get used. you can also tell git to use a specific editor. the -m switch is a short cut to avoid using the editor, and how you describe using it is a fine. Normally, you should also include a short description of what you're doing: git commit -av -m "ACCUMULO-1901 Makes start-all.sh spin up multiple GCs." This command will work if you are in any subdirectory under the root of your git working directory. You need not add any file names. As I mentioned earlier, the "-a" flag in the above command will say "add all changed files." It won't include new files, but will otherwise get everything. If you want finer control, you'd use "git add" on individual files and leave the flag off. There is an astounding depth to what you can do with Git. Hopefully this will get you past the initial hump of utility so you can get this patch in. If you'd like some pointers to go further, just let me know. HTH On Sun, Nov 17, 2013 at 2:54 PM, Terry P. wrote: > Greetings folks, > I'm working on ACCUMULO-1901 but am a newbie with git and want to ensure I > do my check-in and patch correctly the first time. > > My questions are: > > 1. 'git help commit' says "even modified files must be 'added'" but the > Accumulo Contributor instructions don't mention doing a 'git add' at all. > Do I need to first to a 'git add' for the filename I'm changing / going to > change? > > 2. Step 5 "Make commits" mentions "referencing the issue name in the commit > message", but the syntax shown doesn't include the -m switch that I see in > the git commit help. I assume a more complete syntax example for my case > would be: > > git commit -av -m "ACCUMULO-1901" bin/start-here.sh > > Or if I do it from the directory where my code change was done, do I even > need to include the filename? Or ever? (meaning does git commit everything > in its index automatically?) Again, I'm brand new to git and want to do > this right the first time. > > Thanks for the help! > -- Sean --089e01681420f6fcb904eb68498e--