Languages

Git - how to commit manually deleted file?

3 points
Asked by:
Kenya-Spears
860

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:
crystal
632

Use git rm <fileName> command.

In this case, it would be:

Then you can commit:

0 commentsAdd comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
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