Troubleshooting misplaced .git directory (nothing to commit)

后端 未结 16 1488
死守一世寂寞
死守一世寂寞 2020-12-05 01:42

I started getting this message. No matter what I edit and try to commit, it says there is nothing to commit. Looks like git does not see my working directory and looking som

16条回答
  •  情深已故
    2020-12-05 02:11

    Here is another twist on it. My .gitignore file seemed to have been modified / corrupted so that a file I was ignoring

    e.g.

    /Project/Folder/StyleCop.cache
    

    got changed to this (Note now 2 separate lines)

    /Project/Folder
    StyleCop.cache
    

    so git was ignoring any files I added to the project and below.

    Very weird, no idea how the .gitignore file was changed, but took me a while to spot. Once fixed, the hundreds of css and js files I added went in.

提交回复
热议问题