git-修改忽略文件
发布日期:2021-05-07 16:06:20 浏览次数:19 分类:精选文章

本文共 1205 字,大约阅读时间需要 4 分钟。

git ?????????

??? Git ????????????????????????????Git ??? .gitignore ??????????? Git ????????????????????????????????????????????

???? Git ?????

??? Git ????????????????

1. ???????????????????

2. ????????? .gitignore ???

3. ????????? Git ????????????

.gitignore ???????

.gitignore ??????????????????????????????????????

  • * - ??????
  • ? - ??????
  • [/] - ?????????
  • / - ????????????
  • !* - ??????????? ! ?????

???

# ????????????
.DS_Store
node_modules/
dist/
package-lock.json
.env.local
.env.*
.local
# ??????
npm-debug.log
yarn-debug.log
yarn-error.log
pnpm-debug.log
# ????????????
.idea
.vscode
*.suo
*.ntvs
*.njsproj
*.sln
*.sw?

.gitignore ???????

.gitignore ?????????????

  • * ????????
  • ? ????????
  • [/] ???????????
  • ^ ????????????
  • / ??????????????
  • ! ????

???

  • debug/*.obj - ?? debug/io.obj????? debug/common/io.obj ? tools/debug/io.obj
  • **/foo - ?? /foo?a/foo?a/b/foo ?
  • a/**/b - ?? a/b?a/x/b?a/x/y/b ?
  • !/bin/run.sh - ??? bin ???? run.sh ??

?????? .gitignore ???????

?????????? .gitignore ??? Git ??????????????????????????????? Git ???????????????????????

  • git rm -r --cached - ?????????????
  • git add .gitignore - ? .gitignore ????????
  • git commit -m '?? .gitignore ??' - ????
  • ?? Git ??????????? .gitignore ?????????????

    上一篇:vue router介绍 vue路由介绍
    下一篇:vue 跨域 怎么办?

    发表评论

    最新留言

    逛到本站,mark一下
    [***.202.152.39]2025年05月07日 01时01分45秒