The only thing you have to do is when removing files from local repository, rather than manually deleting the file from the local repository use,
git rm <file-name>
or
git rm -rf <folder-name>
After that, commit the change locally and push it. It should reflect in both local and remote repository.
Or if you have already manually deleted the files in the local repository and now if you want to remove from the remote repository as well, use --cached
attribute. That is,
git rm --cached <file-name>
or
git rm -rf --cached <folder-name>
Now if you have manually deleted files and want that reflect in both local and remote git repository, use,
git add -u .
Hope this helps! :)