-
Notifications
You must be signed in to change notification settings - Fork 12k
Git Repo Creation Should Be Opt-In: --skip-git #4854
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
@majew7 the command
|
@beeman I think @majew7 point is that |
We try to stay away from prompts in general. I understand this was surprising behaviour, but it's quite telling that it took so long to be brought up. I think in most cases it's ok, and even when you don't want it it's trivial to 'correct' it. |
I agree, it is totally screwing up my pushes since I push one main folder, and since all the subdirectories are initialized it doesn't want to add them no matter what I do, delete the .git, the .gitignore, add . -f, etc. The only thing I think would solve this is if the CLI didn't assume I wanted a new git init everytime I start a new project. Don't even need to prompt or make in opt-in/out, simply give us the option to git init when we decide to. So far I haven't found anything that rectifies this. |
@pageza does |
I finally got that sorted for all my new projects. The point remains, it should be opt-in, instead of assuming I want all of my projects to be git initialized, or maybe at least a prompt asking if I want to init it. |
100% agree that a git repository should not be initialized by default. Use 'git init' if you want to create a new git repository for the new angular application. Version control is a completely separate activity to application creation (and git is not the only version control system out there...). Even if git is used for version control the user may not want to initialize a new repository but rather add the new application to an existing repository. |
I agree with this as well. Although I am a Git user myself and I like that a Git repository could be used to version control my Angular project, I am quite surprised that a Git repository is initialized by default by a command that is not expected to do so. I totally agree that this should be an opt-in behavior, not an opt-out behavior. The flag should really be Angular projects are in no way dependent on having a Git repository at their root and can function without one, so why create an unnecessary Git repo in every project? Some may not even bother about the repo at all, while others might find it frustrating that they have to clean up the mess by deleting the Sidenote issue:One thing I noticed is that, giving the |
This seems to list "angular-cli" as the contributor for commits on all of my Github projects. Is there a way to change that? |
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. |
OSX El Capitan v10.11.6
CLI: v1.0.0-beta.32.3
Repro steps
ng new my-app
inside a directory inside my Mercurial repo.I had no expectation by running
ng new my-app
that a Git Repo would be created too. This command did something I didn't expect. I was highly confused; no documentation told me this would occur.Suggestion A: This feature may be helpful for some, but not all. Make the feature OPT-IN, not OPT-OUT.
Suggestion B: Let the new command ask, via a workflow if a Git Repo is desired.
Thanks!
The text was updated successfully, but these errors were encountered: