<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Dan,
<div class=""><br class="">
</div>
<div class="">`git rebase master` is the correct command, but there are complications because the history of `branch_remeshing` is somewhat torturous.
<div class=""><br class="">
</div>
<div class="">The feature branch you are trying to rebase has had `master` merged into it multiple times. Conceptually, rebase moves all the commits from a branch and places them at the end of the branch you are rebasing onto (in this scenario it’s `master`),
but your feature branch contains commits where `master` has been merged into the feature branch, which means a straight `rebase` can’t preserve all of the history. I think this is why you are getting the conflicts - they were resolved by merges in the history,
but rebasing means those merges are dropped by default.</div>
<div class=""><br class="">
</div>
<div class="">You might find this Stack Overflow question and answer to be helpful: <a href="https://stackoverflow.com/questions/4783599/rebasing-a-git-merge-commit" class="">https://stackoverflow.com/questions/4783599/rebasing-a-git-merge-commit</a></div>
<div class=""><br class="">
</div>
<div class="">I’ve never tried rebasing with the ` --preserve-merges` flag, but I think it’s what you need if you want to do this. However, I’m not certain that rebasing is the best idea… You’ve got a complicated git history, with lots of changes and multiple
different branches. If it were me, I’d stick with merges and the ugly history, or create a fresh branch and manually transfer the changes to that new branch.</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">Ed</div>
<div class="">
<div class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
<hr style="font-family: Tahoma; font-size: 13px;" class="">
<span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><b class="">Edward
Doddridge</b><br class="">
<i class="">Research Fellow</i></font></span></font></span></font></span></span></div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><i class="">Australian
Antarctic Program Partnership (AAPP)</i></font></span></font></span></font></span></span></div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><i class="">Institute
of Marine and Antarctic Studies (IMAS)</i></font></span></font></span></font></span></span></div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><i class="">University
of Tasmania (UTAS)</i></font></span></font></span></font></span></span></div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<div style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal;" class="">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><i class=""><br class="">
</i></font></span></font></span></font></span></span></div>
<div style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal;" class="">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><a href="http://www.doddridge.me" class="">www.doddridge.me</a></font></span></span></div>
</div>
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 25 Dec 2019, at 02:55, Daniel Goldberg <<a href="mailto:dngoldberg@gmail.com" class="">dngoldberg@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hello All
<div class=""><br class="">
</div>
<div class="">I had a long outstanding development branch corresponding to a pull request (branch_remeshing), and in the interim i created a branch off of this branch (branch_horiz_remeshing). With J-M's help the initial branch is now merged, so now i have
the following:</div>
<div class=""><br class="">
</div>
<div class="">1) my initial branch (branch_remeshing) is identical to master.</div>
<div class="">2) my subsequent branch ( branch_horiz_remeshing) is merged with my initial branch.</div>
<div class=""><br class="">
</div>
<div class="">and I would like it to be as if my branch-of-a-branch was instead a branch of master. from my reading of stackoverflow etc it seems like this should just be a simple call to </div>
<div class=""><br class="">
</div>
<div class="">git rebase master</div>
<div class=""><br class="">
</div>
<div class="">while the branch-of-a-branch is checked out, and this should be without issue. However i am getting extensive merge conflicts, even though i have already merged the branches. Is there a better/proper/preferred way to do this? </div>
<div class=""><br class="">
</div>
<div class="">Apologies for mailing this list rather than one dedicated to git, but a bit of googling seemed to suggest the above, and i would like to adhere to MITgcm best practice anyhow.</div>
<div class=""><br class="">
</div>
<div class="">Best</div>
<div class="">Dan</div>
</div>
_______________________________________________<br class="">
MITgcm-support mailing list<br class="">
<a href="mailto:MITgcm-support@mitgcm.org" class="">MITgcm-support@mitgcm.org</a><br class="">
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
<p style="font-size:10pt; line-height:10pt; font-family: Calibri,sans-serif;"><br>
<br>
University of Tasmania Electronic Communications Policy (December, 2014). <br>
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained
in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.
</p>
</body>
</html>