{"id":21059700,"url":"https://github.com/zthxxx/dont-care-log","last_synced_at":"2026-04-11T16:01:59.869Z","repository":{"id":57215149,"uuid":"217376308","full_name":"zthxxx/dont-care-log","owner":"zthxxx","description":"make git stage ignore specific log code line","archived":false,"fork":false,"pushed_at":"2019-12-03T08:24:21.000Z","size":93,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T08:46:54.576Z","etag":null,"topics":["console-log","console-plugin","git-diff-ignore","git-diff-plugin","git-ignore-log","git-ignore-plugin","git-plugin","ignore-console-log","turbo-console-log"],"latest_commit_sha":null,"homepage":"https://dont-care-log.zthxxx.me","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zthxxx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-24T19:17:06.000Z","updated_at":"2023-09-08T17:59:27.000Z","dependencies_parsed_at":"2022-09-07T12:11:27.336Z","dependency_job_id":null,"html_url":"https://github.com/zthxxx/dont-care-log","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zthxxx%2Fdont-care-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zthxxx%2Fdont-care-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zthxxx%2Fdont-care-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zthxxx%2Fdont-care-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zthxxx","download_url":"https://codeload.github.com/zthxxx/dont-care-log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243505952,"owners_count":20301617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console-log","console-plugin","git-diff-ignore","git-diff-plugin","git-ignore-log","git-ignore-plugin","git-plugin","ignore-console-log","turbo-console-log"],"created_at":"2024-11-19T17:12:43.769Z","updated_at":"2025-12-30T16:33:21.029Z","avatar_url":"https://github.com/zthxxx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dont-care-log\n\n[![Build Status](https://img.shields.io/travis/zthxxx/dont-care-log)](https://travis-ci.org/zthxxx/dont-care-log)\n[![NPM Version](https://img.shields.io/npm/v/dont-care-log)](https://www.npmjs.com/package/dont-care-log)\n[![NPM Downloads](https://img.shields.io/npm/dt/dont-care-log)](https://www.npmjs.com/package/dont-care-log)\n[![Node.js](https://img.shields.io/node/v/dont-care-log)](https://nodejs.org)\n[![LICENSE](https://img.shields.io/github/license/zthxxx/dont-care-log)](https://github.com/zthxxx/dont-care-log/blob/master/LICENSE)\n\nTeach git stage/diff how to **ignore specific logging code**,\n\nso your logging code will never be commit automatically, \n\nof course also wont show dirty in `git`.\n\n\n## Example\n\nAssuming that a **new file** in you project like:\n\n```js\nimport path from 'path'\n\nconst getFile = () =\u003e {\n  const name = 'foo'\n  const file = path.join(__dirname, name)\n  console.log('TCL: getFile() -\u003e name:', file)\n  return file\n}\n```\n\nand with installed [**dont-care-log**](https://www.npmjs.com/package/dont-care-log), you will only see this output below on **`git status/add/diff`** commands\n\n```diff\n+ import path from 'path'\n+ \n+ const getFile = () =\u003e {\n+   const name = 'foo'\n+   const file = path.join(__dirname, name)\n+   return file\n+ }\n```\n\nAmazing, there is no line of `console.log('TCL: ...)`\n\n## Install\n\n```bash\nnpm i -D dont-care-log\n```\n\nand [**Turbo Console Log**](https://marketplace.visualstudio.com/items?itemName=ChakrounAnas.turbo-console-log) for VSCode\n\n\n## How it works\n\n[**dont-care-log**](https://www.npmjs.com/package/dont-care-log) only teach git to ignore the specific format line which is prefixed with any spaces and `console.log('TCL:` (default format of [**Turbo Console Log**](https://marketplace.visualstudio.com/items?itemName=ChakrounAnas.turbo-console-log)).\n\nWell, here defined a **`filter.clean`** pipe to drop the specific line (generated by Turbo-Console-Log),\n\nand some `preinstall` hook to setup `.gitconfig` and `.gitattributes`.\n\nMore details of `git add/staging` workflow see: [\u003e git-scm staging](https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#_keyword_expansion)\n\n\nIn simple terms, `filter.clean` for **staging**, `filter.smudge` **for checkout**\n\n\n![filter-clean](./images/filter-clean.png)\n\n![filter-smudge](./images/filter-smudge.png)\n\n## Next\n\n- [ ] multiline for per log functions\n- [ ] configurable\n- [ ] static parse current line to find out all variables\n- [ ] log plugin of webstorm\n\n## License\n\n[MIT LICENSE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzthxxx%2Fdont-care-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzthxxx%2Fdont-care-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzthxxx%2Fdont-care-log/lists"}