Setting Default Remote Branch Destination [message #1855236] |
Mon, 03 October 2022 11:46  |
Eclipse User |
|
|
|
If I am on Branch1 and rebase that branch on top of Branch2, when I go to push the Branch1 back to the remote, the destination branch is set to Branch2 instead of Branch1 as expected.
I would expect Branch1 since it contains all of the Branch2 changes and the Branch1 changed, so wouldn't want to automatically overwrite Branch2 on the remote.
Is there an option to set it so the original source branch (Branch1 in above example) is still selected in the "Push to branch in remote" => "Destination" => "Branch" field?
Thanks!
Nick
[Updated on: Mon, 03 October 2022 16:31] by Moderator
|
|
|
|
Re: Setting Default Remote Branch Destination [message #1855248 is a reply to message #1855246] |
Tue, 04 October 2022 07:35  |
Eclipse User |
|
|
|
Thanks for the reply, that would only change it for the branch I'm currently on though, correct? It would not automatically select the branch you're on as remote?
I was wondering specifically about after rebasing a branch, the destination branch showing the source branch instead of the original destination.
Here's the procedure we follow:
BranchA is our main branch
Create BranchB from BranchA
Do work and commit to BranchB
If you use the "Push branch 'BranchB'" option at this point the destination branch automatically populates with BranchB as expected, so if you push it, it'll create a remote BranchB.
Let's say there's a merge conflict now, so we need to rebase BranchB on to BranchA. When we complete the rebasing and use "Push branch 'BranchB'" the destination branch now auto populates to BranchA as the remote destination branch.
It that some egit or git sets? Is there a way to automatically have that select BranchB instead of BranchA for the destination branch?
|
|
|
Powered by
FUDForum. Page generated in 0.03768 seconds