.gitignore invalid solution

.gitignore invalid solution

Preface

Sometimes, when we upload a local project to a remote git warehouse, we did not upload the .gitignore file when we submitted the master for the first time. This file is the file that git manages our project. It is also the git protocol for the development team to upload and pull code every time. . So it is very important. .gitignore is only valid for the first submission, and most of the reasons for failure are not the first submission.

solution

Open the project with idea, open the terminal window

Execute the following command:

git rm -r --cached .
git add .
git commit -m .gitignore
// 下面命令是push远程的,可以用idea的工具直接push,也可以执行下面的命令
git push origin master

Guess you like

Origin blog.csdn.net/qq_40093255/article/details/109801690