I'm setting up an Angular 2 sample project. Is my .gitignore
enough already or did I miss anything?
node_modules typings jspm_packages bower_components app/**/*.js app/**/*.map
If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and then add a . gitignore rule for it. Using the --cached option with git rm means that the file will be deleted from your repository, but will remain in your working directory as an ignored file.
angular/cache/ should be enough to ignore that subfolder content. You can see an example in ganatan/angular-starter/. gitignore (from an Angular 13 Example Starter project), where /. angular/cache/ is used, to anchor the rule to the top folder of the repository.
The gitignore file is used to keep track of untracked files that can be ignored during the git commit process. gitignore file is used to maintain untracked files which will be useful during the git commit process to ignore the files. gitignore files are created when using the angular ng tool to create an application.
angular-cli
generates
# See http://help.github.com/ignore-files/ for more about ignoring files. # compiled output /dist /tmp /out-tsc # dependencies /node_modules # IDEs and editors /.idea .project .classpath .c9/ *.launch .settings/ *.sublime-workspace # IDE - VSCode .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json # misc /.sass-cache /connect.lock /coverage /libpeerconnection.log npm-debug.log testem.log /typings # e2e /e2e/*.js /e2e/*.map # System Files .DS_Store Thumbs.db
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With