Description
Versions
Angular CLI: 1.5.3 @angular/cli: 1.5.3
Node: 8.9.1 @angular-devkit/build-optimizer: 0.0.33
OS: win32 x64 @angular-devkit/core: 0.0.21
Angular: 5.0.3 @angular-devkit/schematics: 0.0.37
... animations, common, compiler, compiler-cli, core, forms @ngtools/json-schema: 1.1.0
... http, language-service, platform-browser @ngtools/webpack: 1.8.3
... platform-browser-dynamic, router @schematics/angular: 0.1.7
typescript: 2.4.2
Windows 10 x64 webpack: 3.8.1
Repro steps
- Use
ng new --skip-git
to create a new project without a Git repository. - Open the project folder and look for
.gitignore
file.
Observed behavior
The .gitignore
file does not exist.
Desired behavior
What would like to see implemented?
The .gitignore
file should be generated and added to the project.
What is the use case?
- Project may be part of a larger project that already has a Git repository.
- Project may have a Git repository initialized later.
What did you expect to see?
The .gitignore
file exists.
Mention any other details that might be useful (optional)
A .gitignore
file is still very useful even if no Git repository was initialized. This is because the project may be part of a larger project which already has a Git repository or uses another gitignore-aware VCS. Or a Git repository may be added to the project later. In either case, you do not want all the build files, modules, IDE files, e2e files and whatnot to be checked in to the repository.
For anyone that may never use Git with the project, the .gitignore
file is just a small harmless additional file in the project, so it's not an issue there.
Relates to #4854