github changes not staged for commit

后端 未结 13 686
[愿得一人]
[愿得一人] 2020-12-23 13:31

I have a very basic github setup with a readme, a directory, and another directory inside it with an html file. On github I can only view the readme and the first folder but

相关标签:
13条回答
  • 2020-12-23 14:09

    I tried everything suggested on whole Stackoverflow. Nothing including -a or -am or anything helped.

    If you are the same, do this.

    So, the problem is, git thinks some of your subdirectory is sub-project in your root-project. At least, in my case it wasn't like that. It was just regular sub-directory. Not individual project.

    Move that regular sub-directory which is not being pushed at some temporary location.

    Remove the hidden .git folder from that directory.

    cd to the root directory.

    git init again.

    git add . again.

    git commit -m "removed notPushableDirectory temporarily"

    git push -f origin master

    We will have to force it as the git will see the conflict between remote git and your local structure. Remember, we created this conflict. So, don't worry about forcing it.

    Now, it will push that sub-directory as sub-directory and not as sub-module or sub-project inside your root-project.

    0 讨论(0)
提交回复
热议问题