Github operations

Hi all. I have recently stated working as a software developer and this is my first job ever. The thing I am struggling a lot with is the git. I always get confused about the command lines. I really am not sure what reset hard does and how to stop myself from deleting old files in the git directory. Every time I checkout a new branch, old changes are vanished. I do a lot other destructive stuff as well. I tried searching online but found nothing helpful for me. Is there anything simple to guide me to the magestic roads of github world? :’(

Git takes a little getting used to. I would try out some commands on a personal project in Github to get used to Git. Just remember Github has some special commands not common to all Git-based version control systems. You might just want to take this free course on Git and Github from Udacity, or take a look at this Git Guide.