git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git not tracking changes
@ 2007-01-02  5:52 Deepak Barua
  2007-01-02  5:59 ` Shawn O. Pearce
  0 siblings, 1 reply; 3+ messages in thread
From: Deepak Barua @ 2007-01-02  5:52 UTC (permalink / raw)
  To: git

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
dep@zion:~/programs/elinks/elinks-0.11-20061220$ vi config.h
dep@zion:~/programs/elinks/elinks-0.11-20061220$ git commit
nothing to commit
dep@zion:~/programs/elinks/elinks-0.11-20061220$ git commit
nothing to commit
dep@zion:~/programs/elinks/elinks-0.11-20061220$ ls
ABOUT-NLS     autogen.sh  config.h       configure     debian
INSTALL             Makefile.lib  SITES   TODO
acinclude.m4  BUGS        config.h.in    configure.in  doc
Makefile            NEWS          src     Unicode
aclocal.m4    ChangeLog   config.log     contrib       features.conf
Makefile.config     po            test
AUTHORS       config      config.status  COPYING       features.log
Makefile.config.in  README        THANKS
dep@zion:~/programs/elinks/elinks-0.11-20061220$

I am working on the hooks part modifying the perl script in the same
in the pre-commit hook but that is not related to this ...
what could be the problem...?

Also another file which you can see in the directory called "NEWS" is
being taken in to consideration...
the hook "pre-commit" is enabled and am adding a spell checker to it...
Regards
Deepak



-- 
Code Code Code Away

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git not tracking changes
  2007-01-02  5:52 git not tracking changes Deepak Barua
@ 2007-01-02  5:59 ` Shawn O. Pearce
  2007-01-02  9:54   ` Deepak Barua
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2007-01-02  5:59 UTC (permalink / raw)
  To: Deepak Barua; +Cc: git

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git not tracking changes
  2007-01-02  5:59 ` Shawn O. Pearce
@ 2007-01-02  9:54   ` Deepak Barua
  0 siblings, 0 replies; 3+ messages in thread
From: Deepak Barua @ 2007-01-02  9:54 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git

Thank you shawn.

Regards
Deepak

On 1/2/07, Shawn O. Pearce <spearce@spearce.org> wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-02  9:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-02  5:52 git not tracking changes Deepak Barua
2007-01-02  5:59 ` Shawn O. Pearce
2007-01-02  9:54   ` Deepak Barua

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).