Languages

Git - how to commit manually deleted file?

3 points
Asked by:
Kenya-Spears
410

How do I commit a file that I manually deleted in my project?

After the git status command I get the following result:

Now I want to commit file2.txt, how can I do this?

1 answer
0 points
Answered by:
Kenya-Spears
410

Use git rm <fileName> command.

In this case, it would be:

git rm directory2/file2.txt

Then you can commit:

git commit -m "commit message..."
0 comments Add comment
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join