If I cannot remember what I did, I usually
$ git branch -l to see what I was working on$ git reset --hard && git pullIf you cannot remember what you did, your changes are probably not important anyway. If your team has even made "huge progress" after "you have been away for a while" while not needing your commit, your contribution was probably not necessary either or already implemented by someone else.
Never commit stuff you do not understand. Never commit untested changes. Ideally, implement review and CI processes for pushes and pull-requests. Also try out a sane git branching strategy, using feature branches, so you at least know what you were working on. I really like gitflow , but depending on your situation, there are other good strategies as well.
When writing a commit message, I usually use a verb as the first word followed by the content, for example
$ git commit -am "implement .abc file format for asset loader"
$ git commit -am "fix #123"
$ git commit -am "add package.json"
$ git commit -am "remove foo as a dependency"