
Remove a file from Git remote repo without deleting it locally
Here's a common scenario: you previously committed and pushed to a remote repo, but then decided that you don't want a certain file on the remote repo even though you'd like to keep the same file locally for personal reference. There's a way to fix that! Steps: ~$ git rm -r --cached File-or-FolderName ~$ git commit -m "Removed folder from repository" ~$ git push origin master