How can I delete file from remote git repository? I have a file that is just deleted from working copy local repository, and I want delete it from corresponding remote repository
Simply view any file in your repository, click the trash can icon at the top, and commit the removal just like any other web-based edit. Then " git pull " on your local repo, and that will delete the file locally too.
Execute the following command: git rm --cached path/to/file . Git will list the files it has deleted. The --cached flag should be used if you want to keep the local copy but remove it from the repository.
If you deleted a file from the working tree, then commit the deletion:
git commit -a -m "A file was deleted"
And push your commit upstream:
git push
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With