Unable to build kibana from kibana developing enviroment

I have used contributing kibana guide and opened kibana in offline development environment.

I have made changes to core kibana and plugin i have created in kibana-extra folder.

Now i want to build kibana for deployment.

i have tried
yarn build

but due to offline environment it got fail with some git error , it seems it needs some version control from git.

How can i build kibana again? what should i do?

Thanks in advance.

What OS are you using to build kibana?