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
Join Stack Overflow to learn, share knowledge, and build your career.
|
|
|
If you deleted a file from the working tree, then commit the deletion:
And push your commit upstream:
|
|||||||||||||
|
|
If you pushed a file or folder before it was in .gitignore (or had no .gitignore):
|
|||
|
|
|
If you have deleted lot of files and folders, just do this
|
|||
|
|
|
A simpler way
-A Update the index not only where the working tree has a file matching but also where the index already has an entry. This adds, modifies, and removes index entries to match the working tree. Taken from (http://git-scm.com/docs/git-add) |
|||
|
|
Git Remote repository file deletion simple solution:
It will work.Multiple selective file also you can delete in remote repository same way. |
|||
|
|
|
Use commands :
followed by
your files will get deleted from the repository |
|||||
|
|
if you just commit your deleted file and push. It should then be removed from the remote repo. |
|||
|
|