Best way to use npm and git?
- I create the root folder with my node.js module.
- I add the package.json file and configure the name and the version.
git initin this root folder.
git add .to add all the files to the source control.
- Commit it. This would be my version 0.0.1. I don’t know how to set this in the git.
- And this is all for the first cycle.
Now for the next little change, not version:
- I change a file.
- I change the version in package.json to 0.0.2.
- Same for other little changes, but don’t change the version.
Now for the next version change:
- I change the files
- I change the version to the next.
- I git commit.
I would need some reference between the npm version and git version. How to do it?
One Solution collect form web for “Best way to use npm and git?”
best practise is to add
git is source control system and npm is package managment, ignore stuff like native packages that you use and thats all all the resto or “real” code has to go to module. Also if you have any config files like
database.json put thme into ignore and put into repo sample like
Thats it! :>
You change npm package verison only when you have few comits and feature changes 🙂 so it is exclusive.