Skip to main content

Appendix C Common Git Troubles and How To Fix Them

We all make mistakes, especially with Git. You don’t know how many times I have staged the wrong files or committed my changes before realizing I did something wrong. Of course, it’s best to try and avoid these issues becasue they can cause headaches and frustration. Plus there’s usually a little fear involved (did I just erase my edits?) as well as hesitation (Git only does what I tell it, so I have to make sure I do it right). But just in case something happened that you didn’t expect or you made a mistake, I have your back. Below are some common mistakes and questions you might ask.