Deleting Files in Git
When working with Git, you cannot manually delete files from the project folder. If we try to do this, then after checking with the status command, it will be displayed in the 'Changes not staged for commit' category as a modified but not staged file. To be sure to delete the file we don't need, we should use the git rm command:
git rm text.txt
If you check the status of files in the repository after running this command, the following message will be displayed:
deleted: text.txt
Correctly delete the file from your project folder.