Git will have a hidden folder .git/.git/ in your local repo directory. Everything about your local repository will be stored inside that folder.
So When You create a folder and commit, it will be stored.After that even if you delete the file or folder from your file system it will not be notified to local git repository.
To notify git that you have deleted a file or folder use the command git rmgit rm.
Try this
git rm folder_name
git commit -m "removed folder"
git remote add origin https://github.com/trialcode/test.git
git push -u origin master
git rm folder_name git commit -m "removed folder" git remote add origin https://github.com/trialcode/test.git git push -u origin master Here folder_namefolder_name is the filename or folder name which you wish to remove.