create branch an empty branch in local and remote code example
Example 1: git create empty branch
git checkout --orphan <branchname>
git rm --cached -r .
Example 2: create empty branch git
git checkout --orphan empty-branch
git checkout --orphan <branchname>
git rm --cached -r .
git checkout --orphan empty-branch