Git Product home page Git Product logo

Comments (3)

EdwinTam-MSFT avatar EdwinTam-MSFT commented on May 12, 2024 2

@dscho: I opened this issue on behalf of the original internal bug reporter. As Derrick had mentioned, our internal repo uses GVFS
Locally when I tried to repo the issue, I had the version of git and gvfs version installed from this link https://github.com/microsoft/VFSForGit/releases

I upgraded git to 2.35 using latest release here
https://github.com/microsoft/git/releases

afterwards I uninstall git and downgraded back to 2.33 to confirm

Each time, I had created a fresh repo using gvfs clone
and the rest of the commands were essentially listed above
git reset HEAD~1 // to rollback a commit
git status // to confirm open files

from git.

derrickstolee avatar derrickstolee commented on May 12, 2024 1

@dscho: one thing that appears to be missing from the issue report is that this user is using VFS for Git. I'll make a note to update the issue template to ask "Scalar or VFS for Git?"

from git.

dscho avatar dscho commented on May 12, 2024

@EdwinTam-MSFT thank you for your report!

I do have a hard time trying to reproduce it, though, especially because you did not provide any minimal reproducer. Could you please do that?

Here is my failed attempt at verifying that the issue actually exists (I used the PortableGit from https://github.com/microsoft/git/releases/tag/v2.35.1.vfs.0.0, running its git-bash.exe):

me@work MINGW64 ~/repros
$ git init msgit-490-reset-head-tilde-1
Initialized empty Git repository in C:/Users/me/repros/msgit-490-reset-head-tilde-1/.git/

me@work MINGW64 ~/repros
$ cd msgit-490-reset-head-tilde-1

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ >a1

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ git add a1

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ git commit -m a1
[main (root-commit) 73cccad] a1
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a1

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ >a2

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ git add a2

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ git commit -m a2
[main af3a152] a2
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a2

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ git reset HEAD~1

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ git status
On branch main
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        a2

nothing added to commit but untracked files present (use "git add" to track)

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ echo hello >a1

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ git commit -m a1-modified -a
warning: LF will be replaced by CRLF in a1.
The file will have its original line endings in your working directory
[main bef76c0] a1-modified
 1 file changed, 1 insertion(+)

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ git reset HEAD~1
Unstaged changes after reset:
M       a1

me@work MINGW64 ~/repros/msgit-490-reset-head-tilde-1 (main)
$ git status
On branch main
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   a1

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        a2

no changes added to commit (use "git add" and/or "git commit -a")

As you can see, the file is totally shown as modified, without any additional modifications required.

from git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.