Reputation: 31
Hi I recently started using Git and GitHub so this question might be a dumb one. Everything was working perfectly. I could push and pull files and everything was updating correctly. Then I tried to commit a file to see how it works and suddenly everything stopped working. Every time I try to update a remote repo using the git push origin master
command, the email it shows is different from the one I set with the git config --global user.email "myemail"
command (it shows [email protected]
). How can I get things to work again?
Upvotes: 3
Views: 1004
Reputation: 1329292
Make sure your global config is not overridden by your local config (check the output of git config --local user.email
)
do you need to do those steps (add and commit) every time you change something locally?
Yes, the index (staging area) which is modified by git add is what allows you to prepare your commit (register what you want to commit).
The greatest benefit is the Interactive Staging, where you pick out of a set of important modifications only the subset you want for your next commit (instead of making one giant commit).
Upvotes: 1