xcode - Merge changes from branch into different branch without merging the branch -


i had process in place work on separate 'development' branches merge them 'stable' master branch when finished. create new branch next development branch created master. ensured each development branch contain recent stable changes. made mistake. forgot merge development branch master, created new branch master , worked on lot. new branch has lot of changes not date latest stable changes.

i went ahead , merged previous development branch master - 1 forgot merge. need merge changes master newest development branch. don't want merge master branch dev branch, bringing along of history. want these branches remain separate, want compare differences between 2 branches , merge appropriate code master dev branch single new commit. know there conflicts. how can accomplished?

if possible, prefer visually xcode's source control compare , select changes, if not using terminal fine.

if understand scenario:

  • you created feature branch off of master.
  • you merged new work master ("new" being used here work differs when created feature branch).
  • you want ensure feature branch date what's on master, don't want merge master in.

what can in scenario rebase branch against master.

# when on feature branch: git rebase master 

this ensure work have done beforehand appears after new work exists on master. rewrites history, if you've pushed feature branch @ point, you'll have force-push ensure correct history maintained.

to clarify last point: when rebase, overwrite history of commits creating commit that's similar one, isn't same (different ancestor).

the main guiding principle here history has changed, , if history has been published, want ensure history rebased changes published instead history appears should respect rebase operation.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -