Option 1 for specifying what to commit is

   > by using git add to incrementally "add" changes to the index before using 
the commit command (Note: even modified files must be "added");

Every tutorial I read used the 'add'-after-editing-before-committing approach. 
Even more "interesting", if I understand correctly, is the fact that you can 
'add' an edit, then edit the same file some more, and the additional edits will 
NOT be committed. So 'add' doesn't simply put the file into a state to be 
committed; it must copy the current contents of the file for later commitment. 
Very few of the tutorials bother to mention this, but it's hard to imagine 
something more important for everyday development workflow.

- Gordon


-----Original Message-----
From: Dasa Paddock [mailto:dpadd...@esri.com] 
Sent: Tuesday, March 19, 2013 5:39 PM
To: <dev@flex.apache.org>
Subject: Re: Git basics for SVN users

There are 5 ways listed here to specify the contents of a commit:
http://git-scm.com/docs/git-commit

Options 3 and 4 do not use the index/stage:

        * by listing files as arguments to the commit command, in which case 
the commit will ignore changes staged in the index, and instead record the 
current content of the listed files (which must already be known to git);

        * by using the -a switch with the commit command to automatically "add" 
changes from all known files (i.e. all files that are already listed in the 
index) and to automatically "rm" files in the index that have been removed from 
the working tree, and then perform the actual commit;"

--Dasa

On Mar 19, 2013, at 5:28 PM, Om <bigosma...@gmail.com>
 wrote:

> On Tue, Mar 19, 2013 at 5:06 PM, Gordon Smith <gosm...@adobe.com> wrote:
> 
>> In discussing 'git add', 'git rm', and 'git mv', this document says 
>> "So, just like in SVN, you need to tell Git when you add, move or 
>> remove any files." It makes it sound like these work the same way in Git and 
>> in SVN.
> 
> In fact, don't I have to use 'git add' after I have simply edited an
>> existing file? That's quite different from SVN where I can just edit 
>> and commit. (What could be simpler?)
>> 
> 
> No you dont have to do  'git add' after an edit.  Where in the 
> document does it say that?  Edit and commit just the same way in git as well.
> 
> 
>> 
>> That makes me wonder how accurate this document is elsewhere.
>> 
>> - Gordon
>> 
>> -----Original Message-----
>> From: omup...@gmail.com [mailto:omup...@gmail.com] On Behalf Of Om
>> Sent: Tuesday, March 19, 2013 4:39 PM
>> To: dev@flex.apache.org
>> Subject: Re: Git basics for SVN users
>> 
>> Of course, as the page says, the most current version of this primer course
>> has been moved here: http://git-scm.com/course/svn.html   Please use this
>> link instead.
>> 
>> Thanks,
>> Om
>> 
>> On Tue, Mar 19, 2013 at 4:33 PM, Om <bigosma...@gmail.com> wrote:
>> 
>>> Here is an excellent primer comparing the commands available in Git 
>>> for their equivalent SVN functionalities.
>>> 
>>> http://git.or.cz/course/svn.html
>>> 
>>> I strongly suggest everyone go through this document in its entirety.
>>> 
>> 

Reply via email to