Espidf create new project

I need Help everytime i create new project using framwork (espidf) , it gives me this error and i can’t solve it along of time from trying different senario.

Anyone help me on this ?
and i include the screenshot of this issue in below of topic.

more informtion about it :
board is esp32
Could not initialize project

Click on “Report a problem”. It should show the full error message that you can post here.

what do you mean?
i tried to start my first projct but still give the problem like that

Resolving esp32doit-devkit-v1 dependencies...

Already up-to-date.

Updating metadata for the vscode IDE...

UserSideException: Processing esp32doit-devkit-v1 (platform: https://github.com/platformio/platform-espressif32.git; board: esp32doit-devkit-v1; framework: espidf)

--------------------------------------------------------------------------------

Verbose mode can be enabled via `-v, --verbose` option

CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html

PLATFORM: Espressif 32 (6.5.0+sha.8fe5e12) > DOIT ESP32 DEVKIT V1

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash

DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)

PACKAGES:

- framework-espidf @ 3.50102.240122 (5.1.2)

- tool-cmake @ 3.16.4

- tool-esptoolpy @ 1.40501.0 (4.5.1)

- tool-idf @ 1.0.1

- tool-mconf @ 1.4060000.20190628 (406.0.0)

- tool-ninja @ 1.9.0

- tool-riscv32-esp-elf-gdb @ 11.2.0+20220823

- tool-xtensa-esp-elf-gdb @ 11.2.0+20230208

- toolchain-esp32ulp @ 1.23500.220830 (2.35.0)

- toolchain-xtensa-esp32 @ 12.2.0+20230208

Reading CMake configuration...

-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.39.2.windows.1")

-- The C compiler identification is GNU 12.2.0

-- The CXX compiler identification is GNU 12.2.0

-- The ASM compiler identification is GNU

-- Found assembler: C:/Users/sheha/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc.exe

-- Check for working C compiler: C:/Users/sheha/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc.exe

-- Check for working C compiler: C:/Users/sheha/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc.exe -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: C:/Users/sheha/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g++.exe

-- Check for working CXX compiler: C:/Users/sheha/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g++.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'

-- Could not use 'git describe' to determine PROJECT_VER.

-- Building ESP-IDF components for target esp32

-- Project sdkconfig file D:/IOT-WORK/Blink/sdkconfig.esp32doit-devkit-v1

-- Looking for sys/types.h

-- Looking for sys/types.h - found

-- Looking for stdint.h

-- Looking for stdint.h - found

-- Looking for stddef.h

-- Looking for stddef.h - found

-- Check size of time_t

-- Check size of time_t - done

-- Found Python3: C:/Users/sheha/.platformio/penv/.espidf-5.1.2/Scripts/python.exe (found version "3.11.7") found components: Interpreter

-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS

-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success

-- App "Blink" version: 1

-- Adding linker script D:/IOT-WORK/Blink/.pio/build/esp32doit-devkit-v1/esp-idf/esp_system/ld/memory.ld

-- Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_system/ld/esp32/sections.ld.in

-- Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.ld

-- Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.api.ld

-- Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld

-- Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld

-- Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld

-- Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld

-- Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/soc/esp32/ld/esp32.peripherals.ld

-- Components: __pio_env app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs src tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa

-- Component paths: C:/Users/sheha/.platformio/packages/framework-espidf/components/__pio_env C:/Users/sheha/.platformio/packages/framework-espidf/components/app_trace C:/Users/sheha/.platformio/packages/framework-espidf/components/app_update C:/Users/sheha/.platformio/packages/framework-espidf/components/bootloader C:/Users/sheha/.platformio/packages/framework-espidf/components/bootloader_support C:/Users/sheha/.platformio/packages/framework-espidf/components/bt C:/Users/sheha/.platformio/packages/framework-espidf/components/cmock C:/Users/sheha/.platformio/packages/framework-espidf/components/console C:/Users/sheha/.platformio/packages/framework-espidf/components/cxx C:/Users/sheha/.platformio/packages/framework-espidf/components/driver C:/Users/sheha/.platformio/packages/framework-espidf/components/efuse C:/Users/sheha/.platformio/packages/framework-espidf/components/esp-tls C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_adc C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_app_format C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_coex C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_common C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_eth C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_event C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_gdbstub C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_hid C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_http_client C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_http_server C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_https_ota C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_https_server C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_hw_support C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_lcd C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_local_ctrl C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_mm C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_netif C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_netif_stack C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_partition C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_phy C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_pm C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_psram C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_ringbuf C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_system C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_timer C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_wifi C:/Users/sheha/.platformio/packages/framework-espidf/components/espcoredump C:/Users/sheha/.platformio/packages/framework-espidf/components/esptool_py C:/Users/sheha/.platformio/packages/framework-espidf/components/fatfs C:/Users/sheha/.platformio/packages/framework-espidf/components/freertos C:/Users/sheha/.platformio/packages/framework-espidf/components/hal C:/Users/sheha/.platformio/packages/framework-espidf/components/heap C:/Users/sheha/.platformio/packages/framework-espidf/components/http_parser C:/Users/sheha/.platformio/packages/framework-espidf/components/idf_test C:/Users/sheha/.platformio/packages/framework-espidf/components/ieee802154 C:/Users/sheha/.platformio/packages/framework-espidf/components/json C:/Users/sheha/.platformio/packages/framework-espidf/components/log C:/Users/sheha/.platformio/packages/framework-espidf/components/lwip C:/Users/sheha/.platformio/packages/framework-espidf/components/mbedtls C:/Users/sheha/.platformio/packages/framework-espidf/components/mqtt C:/Users/sheha/.platformio/packages/framework-espidf/components/newlib C:/Users/sheha/.platformio/packages/framework-espidf/components/nvs_flash C:/Users/sheha/.platformio/packages/framework-espidf/components/openthread C:/Users/sheha/.platformio/packages/framework-espidf/components/partition_table C:/Users/sheha/.platformio/packages/framework-espidf/components/perfmon C:/Users/sheha/.platformio/packages/framework-espidf/components/protobuf-c C:/Users/sheha/.platformio/packages/framework-espidf/components/protocomm C:/Users/sheha/.platformio/packages/framework-espidf/components/pthread C:/Users/sheha/.platformio/packages/framework-espidf/components/sdmmc C:/Users/sheha/.platformio/packages/framework-espidf/components/soc C:/Users/sheha/.platformio/packages/framework-espidf/components/spi_flash C:/Users/sheha/.platformio/packages/framework-espidf/components/spiffs D:/IOT-WORK/Blink/src C:/Users/sheha/.platformio/packages/framework-espidf/components/tcp_transport C:/Users/sheha/.platformio/packages/framework-espidf/components/ulp C:/Users/sheha/.platformio/packages/framework-espidf/components/unity C:/Users/sheha/.platformio/packages/framework-espidf/components/usb C:/Users/sheha/.platformio/packages/framework-espidf/components/vfs C:/Users/sheha/.platformio/packages/framework-espidf/components/wear_levelling C:/Users/sheha/.platformio/packages/framework-espidf/components/wifi_provisioning C:/Users/sheha/.platformio/packages/framework-espidf/components/wpa_supplicant C:/Users/sheha/.platformio/packages/framework-espidf/components/xtensa

-- Configuring incomplete, errors occurred!

See also "D:/IOT-WORK/Blink/.pio/build/esp32doit-devkit-v1/CMakeFiles/CMakeOutput.log".

CMake Error at .pio/build/esp32doit-devkit-v1/CMakeFiles/git-data/grabRef.cmake:48 (file):

file failed to open for reading (No such file or directory):

D:/IOT-WORK/Blink/.pio/build/esp32doit-devkit-v1/CMakeFiles/git-data/head-ref

Call Stack (most recent call first):

C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:83 (include)

C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:93 (get_git_head_revision)

C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/build.cmake:70 (git_describe)

C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/build.cmake:240 (__build_get_idf_git_revision)

C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/idf.cmake:53 (__build_init)

C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/project.cmake:29 (include)

CMakeLists.txt:2 (include)

Compiler supported targets: xtensa-esp32-elf

fatal: Needed a single revision

fatal: not a git repository: C:/Users/sheha/.platformio/packages/framework-espidf/components/openthread/openthread/../../../.git/modules/components/openthread/openthread

========================= [FAILED] Took 19.86 seconds =========================

Can you close VSCode, remove C:/Users/sheha/.platformio complete, then restart VSCode? That should not happen.

the same issue how i can solve it ?
after i followed your instruction .

  • Executing task: C:\Users\sheha.platformio\penv\Scripts\platformio.exe run --environment esp32doit-devkit-v1

Processing esp32doit-devkit-v1 (platform: GitHub - platformio/platform-espressif32: Espressif 32: development platform for PlatformIO; board: esp32doit-devkit-v1; framework: espidf)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 (6.5.0+sha.66d21ae) > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:

  • framework-espidf @ 3.50102.240122 (5.1.2)
  • tool-cmake @ 3.16.4
  • tool-esptoolpy @ 1.40501.0 (4.5.1)
  • tool-idf @ 1.0.1
  • tool-mconf @ 1.4060000.20190628 (406.0.0)
  • tool-ninja @ 1.9.0
  • tool-riscv32-esp-elf-gdb @ 11.2.0+20220823
  • tool-xtensa-esp-elf-gdb @ 11.2.0+20230208
  • toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
  • toolchain-xtensa-esp32 @ 12.2.0+20230208
    Reading CMake configuration…
    – git rev-parse returned ‘fatal: not a git repository (or any of the parent directories): .git’
    – Could not use ‘git describe’ to determine PROJECT_VER.
    – Building ESP-IDF components for target esp32
    – Project sdkconfig file D:/IOT-WORK/Blink/sdkconfig.esp32doit-devkit-v1
    – App “Blink” version: 1
    – Adding linker script D:/IOT-WORK/Blink/.pio/build/esp32doit-devkit-v1/esp-idf/esp_system/ld/memory.ld
    – Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_system/ld/esp32/sections.ld.in
    – Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.ld
    – Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.api.ld
    – Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
    – Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
    – Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
    – Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
    – Adding linker script C:/Users/sheha/.platformio/packages/framework-espidf/components/soc/esp32/ld/esp32.peripherals.ld
    – Components: __pio_env app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs src tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
    – Component paths: C:/Users/sheha/.platformio/packages/framework-espidf/components/__pio_env C:/Users/sheha/.platformio/packages/framework-espidf/components/app_trace C:/Users/sheha/.platformio/packages/framework-espidf/components/app_update C:/Users/sheha/.platformio/packages/framework-espidf/components/bootloader C:/Users/sheha/.platformio/packages/framework-espidf/components/bootloader_support C:/Users/sheha/.platformio/packages/framework-espidf/components/bt C:/Users/sheha/.platformio/packages/framework-espidf/components/cmock C:/Users/sheha/.platformio/packages/framework-espidf/components/console C:/Users/sheha/.platformio/packages/framework-espidf/components/cxx C:/Users/sheha/.platformio/packages/framework-espidf/components/driver C:/Users/sheha/.platformio/packages/framework-espidf/components/efuse C:/Users/sheha/.platformio/packages/framework-espidf/components/esp-tls C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_adc C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_app_format C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_coex C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_common C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_eth C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_event C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_gdbstub C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_hid C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_http_client C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_http_server C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_https_ota C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_https_server C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_hw_support C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_lcd C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_local_ctrl C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_mm C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_netif C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_netif_stack C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_partition C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_phy C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_pm C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_psram C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_ringbuf C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_rom C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_system C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_timer C:/Users/sheha/.platformio/packages/framework-espidf/components/esp_wifi C:/Users/sheha/.platformio/packages/framework-espidf/components/espcoredump C:/Users/sheha/.platformio/packages/framework-espidf/components/esptool_py C:/Users/sheha/.platformio/packages/framework-espidf/components/fatfs C:/Users/sheha/.platformio/packages/framework-espidf/components/freertos C:/Users/sheha/.platformio/packages/framework-espidf/components/hal C:/Users/sheha/.platformio/packages/framework-espidf/components/heap C:/Users/sheha/.platformio/packages/framework-espidf/components/http_parser C:/Users/sheha/.platformio/packages/framework-espidf/components/idf_test C:/Users/sheha/.platformio/packages/framework-espidf/components/ieee802154 C:/Users/sheha/.platformio/packages/framework-espidf/components/json C:/Users/sheha/.platformio/packages/framework-espidf/components/log C:/Users/sheha/.platformio/packages/framework-espidf/components/lwip C:/Users/sheha/.platformio/packages/framework-espidf/components/mbedtls C:/Users/sheha/.platformio/packages/framework-espidf/components/mqtt C:/Users/sheha/.platformio/packages/framework-espidf/components/newlib C:/Users/sheha/.platformio/packages/framework-espidf/components/nvs_flash C:/Users/sheha/.platformio/packages/framework-espidf/components/openthread C:/Users/sheha/.platformio/packages/framework-espidf/components/partition_table C:/Users/sheha/.platformio/packages/framework-espidf/components/perfmon C:/Users/sheha/.platformio/packages/framework-espidf/components/protobuf-c C:/Users/sheha/.platformio/packages/framework-espidf/components/protocomm C:/Users/sheha/.platformio/packages/framework-espidf/components/pthread C:/Users/sheha/.platformio/packages/framework-espidf/components/sdmmc C:/Users/sheha/.platformio/packages/framework-espidf/components/soc C:/Users/sheha/.platformio/packages/framework-espidf/components/spi_flash C:/Users/sheha/.platformio/packages/framework-espidf/components/spiffs D:/IOT-WORK/Blink/src C:/Users/sheha/.platformio/packages/framework-espidf/components/tcp_transport C:/Users/sheha/.platformio/packages/framework-espidf/components/ulp C:/Users/sheha/.platformio/packages/framework-espidf/components/unity C:/Users/sheha/.platformio/packages/framework-espidf/components/usb C:/Users/sheha/.platformio/packages/framework-espidf/components/vfs C:/Users/sheha/.platformio/packages/framework-espidf/components/wear_levelling C:/Users/sheha/.platformio/packages/framework-espidf/components/wifi_provisioning C:/Users/sheha/.platformio/packages/framework-espidf/components/wpa_supplicant C:/Users/sheha/.platformio/packages/framework-espidf/components/xtensa
    – Configuring incomplete, errors occurred!
    See also “D:/IOT-WORK/Blink/.pio/build/esp32doit-devkit-v1/CMakeFiles/CMakeOutput.log”.

CMake Error at .pio/build/esp32doit-devkit-v1/CMakeFiles/git-data/grabRef.cmake:48 (file):
file failed to open for reading (No such file or directory):

D:/IOT-WORK/Blink/.pio/build/esp32doit-devkit-v1/CMakeFiles/git-data/head-ref

Call Stack (most recent call first):
C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:83 (include)
C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:93 (get_git_head_revision)
C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/build.cmake:70 (git_describe)
C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/build.cmake:240 (__build_get_idf_git_revision)
C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/idf.cmake:53 (__build_init)
C:/Users/sheha/.platformio/packages/framework-espidf/tools/cmake/project.cmake:29 (include)
CMakeLists.txt:2 (include)

Compiler supported targets: xtensa-esp32-elf

fatal: Needed a single revision
fatal: not a git repository: C:/Users/sheha/.platformio/packages/framework-espidf/components/openthread/openthread/…/…/…/.git/modules/components/openthread/openthread

======================== [FAILED] Took 12.91

The origin of the problem is obscure, I’ve also found similar issues reported in the IDF repo [1, 2]. Some mentions of similar problem have been reported in our community as well.

Could you please share here D:/IOT-WORK/Blink/.pio/build/esp32doit-devkit-v1/CMakeFiles/git-data/grabRef.cmake? My suspicion is that there is a conflict with other Git repository somewhere on the path to your project.