Skip to content

Git does not notice my modified files #2344

Closed
@highfestiva

Description

@highfestiva
  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.23.0.windows.1
cpu: x86_64
built from commit: 4db2e5cc9e1522131a039cbad3970f147a39f0ce
sizeof-long: 4
sizeof-size_t: 8
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.16299.1392]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
$ cat /etc/install-options.txt

Editor Option: VIM
Custom Editor Path:
Path Option: BashOnly
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: ConHost
Performance Tweaks FSCache: Disabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

None that I can think of. I'm on a big corporate network.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

CMD

$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
$ git update-index --refresh
$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
$ git update-index --really-refresh
pom.xml: needs update
$ git status
On branch master
Your branch is up to date with 'origin/master'.

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:   pom.xml

no changes added to commit (use "git add" and/or "git commit -a")
  • What did you expect to occur after running these commands?

I expect the first git status to show my modified file.

  • What actually happened instead?

Only after I do update-index --really-refresh the file shows up as modified.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

Nope, happens many times a day on any one of my 90 corporate repositories. I've cloned all of the repositories multiple times. I've reinstalled git4win 2.23. This is my config:

$ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
credential.helper=manager
user.name=Jonas Bystrom
[email protected]
core.autocrlf=true
core.pager=less -F -X
core.longpaths=true
core.fscache=false
alias.ca=commit -a
alias.nb=checkout -b
alias.quicklog=log --pretty=format:"%h %cr %cn %Cgreen%s%Creset"
alias.logdiff=log -p --stat
alias.search=log --source --all -p --decorate=full -G
push.default=upstream
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=ssh://[email protected]:29418/xxx/xxx/xxx-server
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions