node.jsgitgithubejspush

Can't push index.ejs file to git hub


I have tried to use "git add ." to add and commit file, but folder "views" is not added. [the folder is include index.ejs, header.ejs and footer.ejs files.]

I have tried to cd at Views folder and it's work, but it have to cd .. to commit the folder again.

when I checked in my github repository it's show Views folder but I can't open the folder. and when I tried to clone the project, the file in Views folder doesn't exist too.

I want to know why I can't add, push, open, clone the file. into my github repository.


Solution

  • It might be caused by the .git folder inside your "views" directory. If you see .git folder inside "views" try to remove it and push your code again.