1

I have two git repos. One is purely local. The other has some connection to remote. They both have the same (or mostly the same) master branch.

I've been doing my work and committing to the local repo. I have generated a branch with some history, that I would like to keep around.

How can I keep the history with me, and move my branch with all my work to the repo that is connected to remote? I would like to do this as seamlessly as possible, and avoid annoying the other devs in the repo.

1
  • 1
    you just was to push your branch on the remote?
    – OznOg
    Commented Jun 24, 2019 at 19:16

1 Answer 1

1

In your existing Local repository: git remote add REMOTENAME URL. URL = URL from the remote git page of the repository.

Push from your existing repository: git push REMOTENAME BRANCHNAME. BRANCHNAME = local repo branch name.

Not the answer you're looking for? Browse other questions tagged or ask your own question.