I'm new to angular and I want to create a backup of a project so I have a copy that is working for future reference.
I tried ctrl-c ctrl-v on the project folder but it takes ages and is probably a waste of disk space.
Any ideas? I haven't applied git to the project folder yet.
CodePudding user response:
When creating a project angular creates a git source tree and install all of the dependencies, known as node modules.
What takes time to copy is your dependencies.
What you wish to keep is the project without the dependencies.
Believe it or not, huge coincidence, Angular also provides a .gitignore
file which lists the dependencies as a folder to ignore.
So basically, all you have to do is use git to save your project, basically like any developper would do.
Or you can copy the whole folder, minus the node_modules, like madmen do, it's really up to you.
CodePudding user response:
You just copy the all contents on project folder except the node_modules folder and backup.
Once you need to retrive the backup code, Just navigate to the project folder and run
npm i
Thank you