Nikolas Kallis wrote:
> I am performing the Coreutils Contribution Guidelines:
> http://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING

I will go ahead and try to answer your question but let's take any
future discussion over to the coreutils list please.

> I am up to 'Make your changes on a private "topic" branch - Now,
> modify some file and commit it:' (line 129).
> 
> I modified the file 'DIFF' and executed the command 'git commit
> DIFF', and got the message "error: pathspec 'DIFF' did not match any
> file(s) known to git.".
> 
> What's up with that?

You didn't modify an existing file.  You created a new file.  I am
sure the file you created was from line 77:

    git format-patch --stdout -1 > DIFF

That is for creating a patch for submission by email.  You would not
want to commit that file to version control.  The contents are already
in version control.

Let's say you were going to modify the sort.c file.  You would make
your modifications to that file.  You would then commit that file.
That file is already in version control.  Therefore to commit the
changes to that file by the instructions on line 129 you would say:

  git commit sort.c

Since it is already in version control this action will succeed.  If
you are creating a new file then you would need to 'git add' the file
first.

You may want to start with one of the many git tutorials on the web.
There are several available.  By looking at other tutorials you may
find that one covers things better for you than another.

I would start here:

  http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html

I also found this reference of references a useful list of references.

  http://sixrevisions.com/resources/git-tutorials-beginners/

Bob

Reply via email to