Remove existing files from the repository:
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
Add the line
.DS_Store
to the file .gitignore
, which can be found at the top level of your repository (or created if it isn‘t there already). Then
git add .gitignore
git commit -m ‘.DS_Store banished!‘
1,查找后缀为.DS_Store的文件:
find . -type f -name *.DS_Store
2, 列出所有文件,包括隐藏文件
ls -a
3, vim 查找
命令模式下,按‘/’,然后输入要查找的字符,Enter。?和/的区别是,一个向前(下)找,一个向后(上)。
时间: 2024-10-08 10:29:28