A big rookie mistake that everyone should be aware of is NOT using Version Control. As in, use it. If the above has happened before, it can be completely avoided using any version control software. I personally use bitbucket and sourcetree but there are many out there that can be looked into.
Other noteworthy ones.
TortoiseGit - For windows
But for whichever you go for, use one of them to avoid the mistakes above!