As a developer I want to have multiple projects that can use different versions of NODE js. Also when I checkout new project from a GIT repository I ideally want to run just one command and all things would be automated.
Given that file .nvmrc
allow for automatic switching of NODE versions per directory. And given that my project is built on top of that specific version of NODE and might not work in any other.
Should I commit it to GIT?
This might be opinion based question, but I am really asking on disadvantages of doing so. Are there any risks?
--
Background:
This was like my first commit, after I started working in the new company. My ex-colleague declined that PR (without previous debate), and when I asked, he told me that its a developer responsibility to use proper version.
Well I added .nvmrc
to .gitignore
and used it anyways. Otherwise I would need to type nvm use xx
every time I opened a new window in terminal.