Resync git repo with new gitignore file

前端之家收集整理的这篇文章主要介绍了Resync git repo with new gitignore file前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

The solution mentioned in ".gitignore file not ignoring" is a bit extreme,but should work:

# rm all files
git rm -r --cached .
# add all files as per new .gitignore
git add .
# now,commit for new .gitignore to apply
git commit -m ".gitignore is now working"

参考资料:

猜你在找的Git相关文章