git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git not tracking changes

From
DBDeepak Barua <dbbarua@gmail.com>
Date
Jan 2, 2007, 09:54 UTC
Message-ID
<b5a19cd20701020154w63fd4c4s46a6cb3c6f50ce5a@mail.gmail.com>
In-Reply-To
<20070102055937.GD27690@spearce.org>
Thank you shawn.

Regards Deepak

On 1/2/07, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 31 quoted lines
> Deepak Barua <dbbarua@gmail.com> wrote:
> > Hi,
> >    When i do a git add of a config.h file then make some changes and
> > then do git commit it does not reflect the changes..
> > eg
> > dep@zion:~/programs/elinks/elinks-0.11-20061220$ git add config.h
>
> Here you told Git to take the current contents of config.h and
> stage it into the index.  That content will be in the next
> commit.
>
> > dep@zion:~/programs/elinks/elinks-0.11-20061220$ vi config.h
>
> Then you modify it.  Git doesn't know about those changes to
> config.h, nor does it care at this point.
>
> > dep@zion:~/programs/elinks/elinks-0.11-20061220$ git commit
> > nothing to commit
>
> This is occuring because the content staged in the index does not
> differ from the content in HEAD (the last commit on this branch).
> You need to run `git add config.h` again now that you have modified
> it to restage the modified file.
>
> Basically I'm assuming that when you ran `git add config.h` the
> first time the content must have matched HEAD, which meant you
> didn't actually stage anything.
>
> --
> Shawn.
>
-- 
Code Code Code Away
Previous: Shawn O. Pearce
Message 3 of 3 in “git not tracking changes”
  1. Deepak BaruaJan 2, 2007
  2. Shawn O. PearceJan 2, 2007
  3. Deepak BaruaJan 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.