Comment by lemoncucumber

7 years ago

I think this is bad advice for git newbies two reasons:

1. ‘git add .’ is dangerous and should be avoided IMO, in case you ever have files around that you don’t want to commit. I frequently do. It’s better to ‘git commit -a’, and to just remember to run ‘git status’ frequently and ‘git add’ any new files.

2. ‘git reset —-hard’ is dangerous as well for newbies, since it’s destructive. Better to ‘git revert’ or to ‘git checkout <sha>; git checkout -b <newbranch>’, such that you can always get back to where you were.