what is the meaning of $Id$ at the head of module files?
Its legacy left behind of a no longer used version control system (CVS) used by Drupal.org/projects before the current  version control system (git) was adopted.

You should not use this when writing your own code.  The automated code checker tool at Drupal.org will actually complain if these are present.

And, btw: Git rules!