605 B
Raw Blame History

title, createTime, tags
title createTime tags
gitignore 2022/04/28
git

.gitignore 相关规则

# 忽略所有.a结尾的文件
*.a
# 将lib.a除外
!lib.a
# 忽略项目根目录下的abc
/abc
# 忽略template目录下的所有文件注意是左斜杠
template/

git 处理.gitignore 完成不了的工作

# 添加被.gitignore忽略的文件
git add -f abc.
# 删除已经提交过&&包含在.gitignore中的文件
git rm --cached logs/xx.log
# 目录
git rm --cached -r logs
# 如果提示某个文件无法忽略,可以添加-f强制忽略
git rm -f --cached logs/xx.log