.git/refs/heads/master allow to determine the head commit of the current branch. npm publish use it to determine the git head and add to the published package. See https://github.com/npm/read-package-json/blob/master/read-json.js#L327
In the dependencies step .git/refs/heads/master is preset but it’s missing on all steps following dependencies.
See a reduced test case here: https://circleci.com/gh/vanduynslagerp/test-circleci/33
In order to publish properly with npm (after running the test) we need to have .git/refs/heads/master.
Why is circleCI removing this file ? IS there a way to preserve it?