-
Notifications
You must be signed in to change notification settings - Fork 12k
ng new --skip-git/--skipGit should not skip creating .gitignore file #8638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is by design #3713 |
I now understand it's by design. But what about the use cases I had described? |
@ADTC I think this is such a specific use case that the best option would be to not use the If it's part of a bigger repo you might have to customize it already, the Angular CLI aims to set defaults that work for most situations, but it can never accommodate to any situation. @Brocco might have more ideas about it. |
Here's another use case using VSTS (Visual Studio Online):
|
I expect |
Discussed this in a CLI meeting today. Unfortunately not much justification was given in the original PR, so it's hard to know the major reasons for removing In our discussion, we had the following points:
OTOH:
Users could be creating an Angular application in a directory already under source control, though we already handle that today and include
There's also the somewhat related question of Based on these points, the consensus of the team is to include |
Closing as per above. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
Repro steps
ng new --skip-git
to create a new project without a Git repository..gitignore
file.Observed behavior
The
.gitignore
file does not exist.Desired behavior
The
.gitignore
file should be generated and added to the project.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
The text was updated successfully, but these errors were encountered: