Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular2 .gitignore

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 
like image 777
jjz Avatar asked May 12 '16 12:05

jjz


People also ask

How do I ignore a file in Git?

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.

Should I Gitignore angular cache?

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.

What should I Gitignore in angular project?

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.


1 Answers

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 
like image 76
Günter Zöchbauer Avatar answered Oct 02 '22 07:10

Günter Zöchbauer