How to fix: error: '' does not have a commit checked out fatal: adding files failed when inputting “git add .” in command prompt

后端 未结 6 2140
南笙
南笙 2020-12-30 23:51

I\'m trying to add a ruby rails file to my repository in gitlab but it somehow wouldn\'t allow me to add the file saying that my file does not have commit checked out.

6条回答
  •  抹茶落季
    2020-12-31 00:15

    I had the same Error Message. I fixed it by command below:

    git add folder-name/* instead of git add .

    My Folder directory is like below:

    Main-folder
     -folder-one
     -folder-two
    

    ref: https://github.community/t/error-git-add/2937

提交回复
热议问题