Reputation: 766
I have a situation where I completely re-wrote the code from scratch where we had current existing code on the remote repo.
I would like to push my local new repo master to that existing remote as a branch to merge it later upon review.
Remote git repo: A has branches a1, a2, a3
My local new repo: B
After my desired push to remote: A has branches a1, a2, a3, and ab
Is it even possible?
Thank you.
Upvotes: 5
Views: 1225
Reputation: 311308
Sure. Just push it like this:
git push origin master:ab
This will push your local master
branch to ab
branch of the remote named origin
.
Upvotes: 4