Use the command line below to remove the directory named test_dir from the current directory. Then commit and push to apply changes in the local and remote repository. All done, The test_dir has been removed from the local as well as the remote git repository.