Search code examples
gitgit-svn

Delete all remote files which does not exist locally with GIT


I have lots of files on bitbucket which I do not have/anymore locally on my pc. I would like to delete them all in the next git push. What else git command do I have to execute to delete all remote files which does not locally exist?


Solution

    1. Checkout what you have on bitbucket to your local machine.
    2. Delete the files locally.
    3. Commit your file deletions (git commit -a)
    4. Push commit to bigbucket, they will be removed.