The local development setup script previously skipped repository initialization if the directory merely contained a HEAD file. This caused issues if a previous setup run failed midway, leaving behind an empty bare repository. By explicitly checking for the master branch ref instead, the script now ensures the initial commit actually exists before skipping initialization. This makes the local development environment significantly more resilient to setup interruptions.

Improved the setup script to robustly handle partially initialized sample repositories. - lws803/gitchain