Create new branch when commit id is not available



I am interested in creating a new branch in newly created repository programatically (using CLI/boto3/API call).

Alas, I cannot do that because initial commit id is required, but there is none available at that point of time.

On the other hand, I can do the same action using console and all I need to specify is a branch to point to. In my case it is default branch “main” and that’s all. So, if I can do it from console, then it should be possible to do programatically.

Could you please advise how I can do it without initial commit id or maybe there are any workarounds available?

Thank you.

preguntada hace 3 años271 visualizaciones
1 Respuesta

Wrong question.

respondido hace 3 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas