Nice defaults to have for npm and git

September 24, 2022 1 min read
  • npm
  • git

npm

To see what default settings we have set in npm, we can use the following command 👇

$ npm config ls

and if we want to see the list of available configurations:

$ npm config ls -l

My recommendations:

$ npm config set init-license MIT
$ npm config set init-author-name "Tomeu Cabot"
$ npm config set init-author-email cabotvalloritomeu@gmail.com
$ npm config set init-author-url https://tomtobac.dev

git

See configuration´s defaults:

$ git config --list --show-origin

My recommendations:

$ git config --global user.name "Tomeu Cabot"
$ git config --global user.email cabotvalloritomeu@gmail.com
$ git config --global push.autoSetupRemote true # sets automatically remote branch
$ git config --global core.editor "code --wait" # to change vscode as default editor

Tip: Remember to verify your email address with GitHub to show your profile alongside your commits!