git delete file

1. Delete the file from the repository

git rm filename
git commit

The file is removed from the repository

2. If you delete it by mistake, restore the mistakenly deleted file to the latest version

$ git checkout --filename

But be careful, you can only restore the file to the latest version, you will lose what you modified since the last commit .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324817551&siteId=291194637