How do I move a Git branch out into its own repository?

You can simply push a branch to a new repository. All of its history will go with it. You can then choose whether to delete the branch from the original repository.

e.g.

git push url://to/new/repository.git branch-to-move:new-branch-name

For a new repository, new-branch-name is typically master.

Creating a new, empty repository can be done with git init.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)