From: "Shawn O. Pearce" <spearce@spearce.org>
To: Deepak Barua <dbbarua@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git not tracking changes
Date: Tue, 2 Jan 2007 00:59:37 -0500 [thread overview]
Message-ID: <20070102055937.GD27690@spearce.org> (raw)
In-Reply-To: <b5a19cd20701012152n4f496198h93cab1b9b85a9a45@mail.gmail.com>
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.
next prev parent reply other threads:[~2007-01-02 5:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-02 5:52 git not tracking changes Deepak Barua
2007-01-02 5:59 ` Shawn O. Pearce [this message]
2007-01-02 9:54 ` Deepak Barua
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070102055937.GD27690@spearce.org \
--to=spearce@spearce.org \
--cc=dbbarua@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).