Open Sebast1aan opened 1 year ago
If this is a valid use case in general, I can give this one a try to implement (although my current golang knowledge is limited)
@Sebast1aan Are you trying create a branch totally new without any commit without any history commits? From my experience it is possible to create a branch like this
To explain the use case: I want to add a pipeline to multiple repositories via terraform. The yml file for the pipeline should be placed in a new branch inside each repository, preferably with no other file inside that branch. Since none of these repositories currently have a good default branch to start from, I always end up with a new branch that contains too much code from the original branch.
If see alternative ways to achieve this, that's also fine.
Regarding creating empty branches, I found following stackoverflow questions: https://stackoverflow.com/questions/34100048/create-empty-branch-on-github Not sure if it works in practice however.
@Sebast1aan Empty branch can be created via API.
Community Note
Description
When currently creating a new branch via resource azuredevops_git_repository_branch, it seems not possible to create an empty branch that is not based on another branch/tag/commit.
New or Affected Resource(s)