bozaro / git-lfs-migrate

Simple project for convert old repository for using git-lfs feature
MIT License
222 stars 29 forks source link

Master branch is created in converted repo even if it does not exist in the initial repo #41

Open lavinia8 opened 7 years ago

lavinia8 commented 7 years ago

The master branch is automatically created by the conversion => this prevents the subbranches of master to be created.

Usecase: There is no master branch in the original repository; the default one is main. There are several branches named master/<name>. During the conversion, master is automatically created and, in the end, it points to the same commit the main branch points to. Besides that, the subbranches of master cannot be created, which leads to missing branches and dangling commits.

The workaround is to rename all the master/<name> branches to placeholder/<name>, run the conversion, delete the master branch (because in the initial repo the default is main) and rename back the branches to master/<name>.

:question: Why is master created in the converted repo since there is no master in the initial repo and why does it point to the same commit the default branch points to?