Push local new Git repo to existing remote repo as branch?

Nomadme

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.

larsks

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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

push new git branch to remote repo on eclipse

From Java

Git push existing repo to a new and different remote repo server?

From Java

Push local Git repo to new remote including all branches and tags

From Dev

git push branch to a new repo with a different name

From Dev

Push local repo to new sub-directory of remote repo

From Dev

unable to push my local git repo to the remote repo

From Dev

Git / GitHub: How to get new local repo into empty remote repo

From Dev

Drop remote branch and reset local repo to match remote using GIT

From Dev

reassign an existing remote repo to my local repo

From Dev

If on a local branch, how should I push that repo to remote from local repo that already exists?

From Dev

Push git alias to remote repo

From Dev

Failure to push to remote repo in Git

From Dev

How to push a new local repository to old remote repo?

From Dev

Can I add a file to my local Git repo but not push it to remote

From Dev

Cannot push to heroku after adding a remote heroku repo to my existing local repo

From Dev

Create new repo by 'git remote add origin' and 'push'

From Dev

Pushing new files to specific branch in existing repo

From Dev

Git push to repo's default branch

From Dev

Track existing folder from remote git repo

From Dev

Adding svn-remote to existing git repo

From Dev

Adding svn-remote to existing git repo

From Dev

Push existing Git repo to a folder in svn

From Dev

Push existing Git repo to a folder in svn

From Dev

Moving git branch to another local repo

From Dev

Git - Push current Heroku repo to a remote github repo

From Dev

Git - Push current Heroku repo to a remote github repo

From Dev

git push to remote repo, but seems nothing is uploaded on repo

From Dev

How do I push a new repo to a remote?

From Dev

Git push new repo based on other repo, start new

Related Related

  1. 1

    push new git branch to remote repo on eclipse

  2. 2

    Git push existing repo to a new and different remote repo server?

  3. 3

    Push local Git repo to new remote including all branches and tags

  4. 4

    git push branch to a new repo with a different name

  5. 5

    Push local repo to new sub-directory of remote repo

  6. 6

    unable to push my local git repo to the remote repo

  7. 7

    Git / GitHub: How to get new local repo into empty remote repo

  8. 8

    Drop remote branch and reset local repo to match remote using GIT

  9. 9

    reassign an existing remote repo to my local repo

  10. 10

    If on a local branch, how should I push that repo to remote from local repo that already exists?

  11. 11

    Push git alias to remote repo

  12. 12

    Failure to push to remote repo in Git

  13. 13

    How to push a new local repository to old remote repo?

  14. 14

    Can I add a file to my local Git repo but not push it to remote

  15. 15

    Cannot push to heroku after adding a remote heroku repo to my existing local repo

  16. 16

    Create new repo by 'git remote add origin' and 'push'

  17. 17

    Pushing new files to specific branch in existing repo

  18. 18

    Git push to repo's default branch

  19. 19

    Track existing folder from remote git repo

  20. 20

    Adding svn-remote to existing git repo

  21. 21

    Adding svn-remote to existing git repo

  22. 22

    Push existing Git repo to a folder in svn

  23. 23

    Push existing Git repo to a folder in svn

  24. 24

    Moving git branch to another local repo

  25. 25

    Git - Push current Heroku repo to a remote github repo

  26. 26

    Git - Push current Heroku repo to a remote github repo

  27. 27

    git push to remote repo, but seems nothing is uploaded on repo

  28. 28

    How do I push a new repo to a remote?

  29. 29

    Git push new repo based on other repo, start new

HotTag

Archive