Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to skip initializing a Git Repository during creation of angular 6 project

Tags:

angular

Is there any command to skip initializing a Git Repository during angular 6 project creation

I am using ng new [name] command to create angular 6 project. by default it is adding git repository.

ng new [name]

like image 515
Dinesh Hiregange Avatar asked May 28 '19 05:05

Dinesh Hiregange


People also ask

Which is the correct way to initialize a new git repository?

To create a new repo, you'll use the git init command. git init is a one-time command you use during the initial setup of a new repo. Executing this command will create a new .

Should I git initialize before git clone?

Typically, you only use git init if you already have code and you want to put it in a new Git repository. In answer to your question: if you want to clone a project, then you do not need git init .

What is the correct method to initialise a directory for git?

For an existing project to become a Git repository, navigate into the targeted root directory. Then, run git init . Or, you can create a new repository in a directory in your current path. Use git init <directory> and specify which directory to turn into a Git repository.


2 Answers

Updated answer: Use --skip-git argument instead of deprecated --skipGit.

Old answer: You can use --skipGit argument.

From docs:

--skipGit=true|false

When true, does not initialize a git repository.

Default: false

Aliases: -g

Official docs - See Arguments section.

like image 136
leopal Avatar answered Oct 09 '22 09:10

leopal


To list the available options

ng new  --help 

To skip Git. This is the command

ng new my-app --skip-git
like image 22
Manoj Ramanan Avatar answered Oct 09 '22 07:10

Manoj Ramanan