Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

branching for repos with multiple remotes #33

Merged
merged 1 commit into from Aug 21, 2013
Merged

branching for repos with multiple remotes #33

merged 1 commit into from Aug 21, 2013

Conversation

jm3
Copy link
Contributor

@jm3 jm3 commented Aug 20, 2013

multi-headed hydra remote style 馃悏 #pacificrim

@jamiew
Copy link
Collaborator

jamiew commented Aug 21, 2013

馃挵

jamiew added a commit that referenced this pull request Aug 21, 2013
branching for repos with multiple remotes
@jamiew jamiew merged commit 73f0254 into git-friendly:master Aug 21, 2013
@jamiew
Copy link
Collaborator

jamiew commented Aug 21, 2013

I also very much enjoyed testing this patch by using the patch's remote branch

$ git remote add jm3 https://github.com/jm3/git-friendly.git
$ git fetch jm3
$ branch multiple-remotes
* Tracking existing remote branch...
Branch multiple-remotes set up to track remote branch multiple-remotes from jm3 by rebasing.
Switched to a new branch 'multiple-remotes'
$ say 'fuck yeah'

@jamiew
Copy link
Collaborator

jamiew commented Aug 22, 2013

Funny bug I just hit: branch master tried to have me track "heroku/master" rather than "origin/master"

All still seems to work OK, but wonder what's desirable there?

@jm3
Copy link
Contributor Author

jm3 commented Aug 22, 2013

Doh, we can do better than that! Behavior should be: If the named branch exists on multiple remotes, track the first
remote alphabetically with the named branch, UNLESS one of the remotes is named origin, then track that one. I rebased onto your master, added a new commit with the updated behavior, and then force-pushed to my topic branch again so the updated branch should "just appear" in this pull request. (If you see a few commits below just ignore; Github includes them because they reference this issue number, even though I rebased the commits out.)

Testing repo = so meta

$ git br -a
* foo
  master
  remote-test
  remotes/dropbox/master
  remotes/fake-heroku/master
  remotes/heroku/master
  remotes/origin/HEAD -> origin/master
  remotes/origin/foo
  remotes/origin/master
  remotes/z-alphabetically-last/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants