I'm trying to add a ruby rails file to my repository in gitlab, but it doesn't allow me to add the file saying that my file does not have a commit checked out.
I've tried git pull
, and making the the file again and git add
ing it, but it still doesn't work. This is the error message I get:
error: '172069/08_lab_routes_controllers_views_172069_172188-Copy/adventure_game/' does not have a commit checked out
fatal: adding files failed
If you have a subdirectory with a .git
directory and try to git add .
you will see this message.
This can happen if you have a git repo and then create/clone another repo in a subdirectory under that repo.