This error actually means that the directory which you are currently in is not a git repository or you haven't initialized the repository yet.
At first make sure that you are in the right directory i.e. git repository. Secondly type "git init" to initialize your repository. If you are not sure that you have initialized the directory or not, execute "git init" once again. If the repository is not initialized it will initialize for you, otherwise it will reinitialize the repository for you.
Please Like and Share the Blog, if you find it interesting and helpful.