How to delete file in git

Git782

 description

When using Git to manage code, you can delete files by rm. For example, we delete the file1.py file in the current code. After use, the file will be deleted from the file system and the warehouse.

 command

git rm file1.py

 parameter

git :  is a free and open source distributed version control system
rm :  remove files from working tree and index

 result

rm 'file1.py'
Was this helpful?

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.