Skip to content

failed to restrict file handles (5) #5748

@kaigekong

Description

@kaigekong

Existing issues matching what you're seeing

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

Git for Windows version

git version 2.48.1.windows.1
cpu: x86_64
built from commit: 2bd190bcd280bc95f537c2d532880a5e539b5132
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
feature: fsmonitor--daemon
libcurl: 8.12.1
OpenSSL: OpenSSL 3.2.4 11 Feb 2025
zlib: 1.3.1

Windows version

Windows 11

Windows CPU architecture

x86_64 (64-bit)

Additional Windows version information

Microsoft Windows [版本 10.0.26100.4652]

Options set during installation

Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable FSMonitor: Disabled

Other interesting things

No response

Terminal/shell

PowerShell

Commands that trigger the issue

PS C:\Users\xxx\Desktop\Codes\xxxxx-h5> git checkout feature/xxxxx-详情-xxxxx
error: Your local changes to the following files would be overwritten by checkout:
        xxxxx.js
Please commit your changes or stash them before you switch branches.
Aborting
PS C:\Users\xxxxx\Desktop\Codes\xxxxx-h5> git checkout .
Updated 1 path from the index
PS C:\Users\xxxxx\Desktop\Codes\xxxxx-h5> git checkout feature/xxxxx-详情-xxxxx
Switched to branch 'feature/xxxxx-详情-xxxxx'
Your branch is behind 'origin/feature/xxxxx-详情-xxxxx' by 15 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
PS C:\Users\xxxxx\Desktop\Codes\xxxxx-h5> git pull
warning: failed to restrict file handles (5)

handle #0: 000000000000063c (type 3, handle info (1) 0
handle #1: 0000000000000640 (type 3, handle info (1) 1
handle #2: 0000000000000574 (type 2, handle info (1) 1

This is a bug; please report it at
https://github.com/git-for-windows/git/issues/new

To suppress this warning, please set the environment variable

        SUPPRESS_HANDLE_INHERITANCE_WARNING=1

Updating 96xxx5f..xxxxx
error: Your local changes to the following files would be overwritten by merge:
        types/xxxxx.d.ts
Please commit your changes or stash them before you merge.
Aborting

Expected behaviour

切换分支拉取远程仓库的最新代码

Switch branches to pull the latest code from the remote warehouse

Actual behaviour

①git checkout xxxx ② git pull

警告 出现执行失败的句柄,提醒上报问题
然后检测到本地有未提交的代码,然后被拒绝了 aborting 掉了

Warning: Failed execution handler appears, reminding you to report the issue.
Then it detected uncommitted code locally and rejected it.

Repository

No !!!

因是商业内部隐私项目不公开,抱歉
Because it is a commercial internal privacy project, it is not open to the public. Sorry.

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