Pagine

Friday 19 May 2017

How to removing a file with git

If you don't want a file anymore, there are two ways to remove it. First mode: delete the file manually and commit the changes. This will delete the file locally and on the repository. Use the following command line:
$ rm myfile.txt
$ git commit -m 'delete the file with name: myfile.txt'
Second mode: delete the file only through git:
$ git rm --cached myfile.txt

No comments:

Post a Comment