I read this SO topic, and am in the same situation myself. My question is, if I push the branch to a new remote, will it still have the commits that it had when it was a branch of the original repo?
Asked
Active
Viewed 49 times
1 Answers
1
Yes. (Really, that's the answer.)
When you have a branch in a local repository, it's a branch in a local repository. It's never a branch in the remote repo (though you may have remote-tracking branches in local repo). You can push a local branch to any number of remotes.
You can have one upstream branch for every local branch, but it's not remote branch — it's a remote-tracking branch in local repo. But you can also have zero upstream branches. Even if a local branch has an upstream branch that doesn't prevent pushing the branch to any number of remotes.

phd
- 82,685
- 13
- 120
- 165