background
Before the code was on svn, the company later said that it would migrate to git. So I already had the code locally and uploaded the code on git. What needs to be done is to associate my local code with the remote git. Associate local master to remote master
method
Create a tmp folder
cd tmp
git clone xxxxxx and
copy the generated .git file to the target folder
(Ps. This is a trouble-free method. I have tried to associate remote branches before, and always report errors ...)
.gitignore ignores some files
Create a .gitignore file locally and add the file path to be ignored. Add .gitignore itself.
Such as:
.idea/
.svn/
target/
elc.log
nlp.knowledge.portrait.iml
.gitignore