git create new repo from branch

C++
$ git push https://github.com/accountname/new_repo.git +old_branch:master

Source

Also in C++: