-1

I have a github repository with some work inside.

I have been asked to push this work to another host.

So far, I added the other remote to my local repository:

git remote -v 
    apt   URL (fetch)
    apt   URL (push)
    origin  URL (fetch)
    origin  URL (push)

Origin is the original repo I used, apt is the new remote repository.

However, in the new (apt) remote, there is already a readme (created by default), and I do not have the permission to git push -f to the (nearly) empty new remote.

My guess is that I should merge/rebase the master of the origin with the master of apt. I am "afraid" to do stuff because I am not sure how git will behave handling two branches with the same name (if such a thing is possible).

How can I push my work, present on origin/master, to apt/master ?

Liam
  • 27,717
  • 28
  • 128
  • 190
Itération 122442
  • 2,644
  • 2
  • 27
  • 73

1 Answers1

0

A simple git push will push the current branch to it's default repository.

To push to a specific repository, just add it's name to the invocation:

git push apt

BTW, this is documented in the manual for git push, which you can invoke with:

git push --help
umläute
  • 28,885
  • 9
  • 68
  • 122