试图做一些改变.我使用git add来添加我使用通配符* .js创建的任何新的
javascript文件.然后我做了修改并推送到github:
git add *.js
git commit -m "stuff"
git push github master
当我检查github时,我编辑的所有文件都是空白的.他们在那里,只是空着.
然后,我试图再次提出,但GIT说,一切都是最新的.
然后我回去注意到,在我做了git commit -m“stuff”之后,GIT显示了一个消息,表示一堆我的“.js”文件没有上传,即使我刚刚使用通配符添加它们:git add * .js文件.这是当我尝试提交时显示的消息.
# On branch master
# Changes not staged for commit:
# (use "git add/rm ..." to update what will be committed)
# (use "git checkout -- ..." to discard changes in working directory)
#
# modified: src/static/directory1/js/module1/file1.js
# modified: src/static/directory1/js/module1/file2.js
# modified: src/static/directory1/js/module2/file1.js
为了解决这个问题,我在做git add时,不得不下了几个目录:
git add src/static/directory1/*.js
这似乎是有效的,因为文件在我再次提交之后,然后被推送到github:
git commit -m "stuff"
git push github master
这里发生了什么,为什么我必须浏览几个目录才能使通配符工作?
谢谢!