Git - Won't add files?

后端 未结 29 2166
小蘑菇
小蘑菇 2020-12-13 12:01

I\'m having issues where I can\'t add files to my repository.

I\'m using GIT on windows, in Aptana Studio for some Ruby development.

I\'ve managed to push a

29条回答
  •  青春惊慌失措
    2020-12-13 12:17

    To add to the possible solutions for other users:

    Make sure you have not changed the case of the folder name in Windows:

    I had a similar problem where a folder called Setup controlled by Git and hosted on GitHub, all development was done on a Windows machine.

    At some point I changed the folder to setup (lower case S). From that point on when I added new files to the setup folder they were stored in the setup folder and not the Setup folder, but I guess because I was developing on a Windows machine the existing Setup folder in git/github was not changed to setup.

    The result was that I couldn't see all of the files in the setup in GitHub. I suspect that if I cloned the project on a *nix machine I would have seen two folders, Setup and setup.

    So make sure you have not changed the case of the containing folder on a Windows machine, if you have then I'd suggest:

    • Renaming the folder to something like setup-temp
    • git add -A
    • git commit -m "Whatever"
    • Rename the folder back to what you want
    • git add -A
    • git commit -m "Whatever"

提交回复
热议问题