.gitignore - liluximax/weixin GitHub Wiki
git中.gitignore
在eclipse中新建文件夹,新建文件,新建包,均发现无法commit至git 后来发现是clone git工程时,.gitignore文件问
原来的.gitignore中有一行 /Weixin/ 意思是不对Weixin这个文件夹进行版本控制 把这行注销之后,eclipse中就可以Add to index
另一种方法是,手动 git add [new file]
不过这种方法,显然很慢
手动 git add [new file]后出现报错:
`The following paths are ignored by one of your .gitignore files: Weixin/WebContent/NewFile.jsp Use -f if you really want to add them. `
如果之前仔细阅读报错信息,其实可以更快的解决错误。期初,只注意到了-f这个信息