tags:

views:

39

answers:

1

I'd like to make my local repo point to a different fork of the same project. Will this work?

  1. Do a merge with the 'target origin'
  2. Change the origin repo in my config file to the 'target origin'

Also, if my local repo is not entirely identical to the new origin (say, I've resolved some merge conflicts in my favor), will these changes be pushed to the new origin when I do a git push, or will only commits made after the change of origin get pushed?

+1  A: 

To make sure of the impact such an operation will have on the remote, I would rather:

  • git clone new_remote
  • git remote add local /path/to/local/repo
  • git fetch local

That way, you can start merging on your new cloned repo, see if there is massive complication, before pushing the result to "new_remote".
It is better than just adding new_remote to your current local repo, make your pull/merge, and then pushing "hoping" it will go well. At least, you are in control of the "new_remote" clone on your computer.

VonC
Thank you, you've been very helpful!
int3