$ git config --global core.excludesfile ~/.gitignore_global $ vim ~/.gitignore_global #配置文件参考如下 # for Mac OS X System Files .DS_Store Thumbs.db # for emacs *~ [#]*[#] # for Eclipse *.project # for Logs and databases *.log # remove SVN .svn # for Xcod
不可忽略的备份格式 sed -i 's/hello/world/g' hello.text 上面这行代码,可以在 linux 上运行,作用是将找到的 hello 替换为 world,并且直接保存修改到文件.但是如果在 Mac 上,你会发现这行代码会报错.原因是在 Mac 上,sed 命令直接操作文件的时候,必须指定备份的格式,而在 linux 上,却并没有这个要求. sed -i '' 's/hello/world/g' hello.php 如上面的代码所示,在 -i 之后加上一对引号,来指定备