I have been using Git for a while, and it has become very uncomfortable when I don't have it in my workflow.(If you're a software developer and the company where you work does not have a version control system. Run, my friend, run..) It is a powerful tool to have in your workflow and yes, very easy to use. In other words, I am a big fan of Git.
The biggest mistake I made while using Git was committing files in a wrong branch.
If you have done a
git add . and commit them to the wrong branch like I did. To get past this is actually pretty easy.
Running the following command should undo your last commit:
git reset --soft HEAD~1
Note: the files are still added, but not committed. You can then commit them in your correct branch. Easy?