I will repeat the above steps again, because you need to understand these steps well. Your local repository is not the same as your working directory. So when you write code and save, it will be saved in your working directory. Then from that working directory, you will add selected files into the 'Staging' area. From the staging area you will move your code to your 'Local Repository'. Remember at this step all these changes happen only inside your computer. Code is not moved to the remote git repository. Only when you do push action, your code is moved from your local repo to remote repo.