bahmutov / bahmutov/pre-git

pre-merge issue with `rm -rf node_modules`

Open
#60 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
170
Forks
22
PR merge metrics
No merged PRs in 30d

Description

I like the idea of #35 a lot, but it caused me a problem. For `pre-merge` I want to remove all npm packages with `rm -rf node_modules`, and then reinstall them. But, then pre-git changes the `package.json` file again on reinstall, changing my settings in `package.json` (for instance, adding the commit script, which I don't want) and recreating the git hooks. I solved this by doing `npm prune`, `npm update` instead, which is probably better anyway… I think. It might be better to use this approach in the README.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the README section describing pre-merge and the behavior around reinstalling packages. Reproduce the reported flow with npm prune and npm update, then document the approach that avoids unwanted package.json changes and recreated hooks. Done means the README clearly explains the safer commands and their effect.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, javascript
Domain
developer-experience, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.