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

Re: Expected bug with reset --hard

From
NCNicholas Chmielewski <nicholas.chmielewski@ennova.com.au>
Date
Oct 15, 2014, 05:47 UTC
Message-ID
<CAEemfuUNEEkgaX+ek0N1_801Zu=g6AizABmzAakpkosx93A_eQ@mail.gmail.com>
In-Reply-To
<CAEemfuW5k+2r7TpetUK8dh5vLZBR4-Kc1JgYJhG-RPpoQTRQ3Q@mail.gmail.com>
I'd like to rescind my bug report.

A bit more further investigation revealed that git was detecting the file with changes as jquery.datatables.js but the file in my directory was reported as being named jquery.dataTables.js .

I'm currently working on OS X 10.9, and this issue is probably related more to the case-preservation of the file system rather than git itself.

On 15 October 2014 14:34, Nicholas Chmielewski <nicholas.chmielewski@ennova.com.au> wrote:

Show 31 quoted lines
> git version 1.9.1 & version 2.1.2
>
> I had some changes in a tracked file that I wanted to discard.
> Instead of using checkout, I instead used `git reset --hard HEAD` to reset.
>
> Git returned the message `HEAD is now at <sha> <commit-message>`
> I then went `git status` and it showed me that I still have changes to commit
>
> I expected there to be no changes in my working directory as a result of
> doing a `git reset --hard`
>
> I did a little more fiddling around and still yielded the same results.
>
> - `$ touch file.md`
> - `$ git add file.md`
> - `$ git commit -m 'empty file'`
> - `$ echo 'text' > file.md`
>
> At this point git reported that I had uncommited changes for both file.md and
> the troublesome file in question (jquery.datatables.js)
>
> `$ git reset --hard HEAD`
>
> Git now no longer reports and untracked changes for file.md but still
> for jquery.datatables.js
>
> `$ git reset --hard HEAD~1`
>
> Git still reports untracked changes for jquery.datatables.js
>
> I have included a copy of the diff of the jquery.datatables.js
Previous: Nicholas Chmielewski
Message 2 of 2 in “Expected bug with reset --hard”
  1. Nicholas ChmielewskiOct 15, 2014
  2. Nicholas ChmielewskiOct 15, 2014

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.