The conflict between git and init

in the process of using git, such as creating a project project on github,

git clone.

then you have the project folder project

then I initialize the project with vue or other init tools, indicating that the folder already exists. You cannot create a project
, and you cannot upload git after creating a project first

. For the question of

rookies, please advise

Apr.19,2022
After

git clone pulls the code locally, there will be a .git folder, and then your vue init will also create a .git folder, so it will fail.
you can first vue init, then delete the .git folder, and then git init to associate with the remote repository.


means that you first create a project in github called project . After clone arrives locally, you want to initialize a file with the same name through cli and encounter a file conflict error?

if this is the case, you can initialize the project first, and then set the git remote address by setting git remote on the command line. The general process is as follows:

-sharp 
$ mkdir git_test
$ cd git_test

-sharp git
$ git init

-sharp ,  github  git 
$ git remote add orgin git@github.com:anran758/test.git

-sharp  log 
-sharp 
Menu