1

I have a problem with staging changes in a folder.
It is a React project next to .NET project - a folder basically.
Git views it as a file without extension and prevents from staging changes, therefore I cannot commit changes.

What happened? Why is it listed that way and how can I fix it?

Unstaged file is actually a folder, but is listed as file with no extension.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Krzysztof
  • 11
  • 1
  • check this if it helps to you- https://stackoverflow.com/questions/24412858/why-is-git-not-staging-some-modified-folders-for-an-initial-commit – bamishr Nov 12 '20 at 21:31

1 Answers1

0

That client_app folder has a .git in it, which makes client_app a nested git repository for its parent main repository.

A nested Git repository is treated as a gitlink

160000: A gitlink, SHA-1 of the object refers to a commit in another repository. Git links can only be specified by SHA or through a commit mark.
They are used to implement submodules.

Unless you main repository has a .gitmodules file, you cannot directly stage content in client_app.
Or, as commented, you would need to delete its .git/ subfolder in order for the main repository to see client_app as a regular folder.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250