If a directory was added to .gitignore before pushing to the repository, it does not get pushed. But if the directory was already pushed, and later added to .gitignore, then to remove it from the repository: The directory dirToIgnore should now be removed from the git repository.
Install git on the remote server (if it is not already). On Ubuntu: Create an SSH key pair (locally): Accept the default file to save the key. If a passphrase is entered, it would have to be entered every time during ‘git push‘. The following two files would be created in ~/.ssh/ id_rsa.pub (public key)id_rsa […]