Remove File Already Tracked
- git rm -r -n --cached "file"
- -r : recursion
- -n : dry-run, for checking & not perform the op
- -f : force
- --quite : no output
- --cached: only remove stashed from index, file will not del
[ivan@day103 resources]$ git rm -r -n --cached application-prod.yml
rm 'm64-fund/src/main/resources/application-prod.yml'
[ivan@day103 resources]$
Set into ignore
- edit .gitignore
### Prod Setting ###
/m64-fund/src/main/resources/application-prod.yml
本文由 Ivan Dong 创作,采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为: Jun 13, 2023 at 09:58 am