I am trying to push changes to my repository:
-My Folder
  --Chapter 1
  --Chapter 2
  --Chapter 10
    --my_new_file.py
I added new folder Data a long with changing the code in my_new_file.py:
-My Folder
  --Chapter 1
  --Chapter 2
  --Chapter 10
    --my_new_file.py
  --Data
I tried this:
git rm -r --cached Data
git commit -m "Removed folder from repository"
git push origin master
But I get this:
fatal: pathspec 'Data' did not match any files
As I understand from this answer it's the correct way to do it, what am I doing wrong? I want the folder Data to stay in my local folder but not be pushed to my repository.
 
     
    