Result of lots of searching on net is that pre-checkout hook in git is not implemented yet. The reason can be:
pre-checkout
I got the reason why it was not implemented. In my situation I do backup the database and store it in a file, which will fail the check-out every-time. So this will be impractical to implement this functionality.