如题,我本地有一个_posts文件夹,但是我做了一些修改后再push到github上却看不到这个文件夹了,请问这是怎么回事,应该如何修复呢?
git status
的输出如下:On branch gh-pages
Your branch is up-to-date with 'origin/gh-pages'.
nothing to commit, working directory clean
然后操作
git add _posts
git status
输出:
On branch gh-pages
Your branch is up-to-date with 'origin/gh-pages'.nothing to commit, working directory clean
git commit -a
的输出
On branch gh-pages
Your branch is up-to-date with 'origin/gh-pages'.
nothing to commit, working directory clean
执行git rm -r _posts
后有如下输出:
fatal: pathspec '_posts' did not match any files
github默认不允许push空文件夹,所以你只add一个空文件夹是push不上去的。