0

Right now I stay on branch 4.8.2_343

I don't want to merge into default branch but I want to replace default content with 4.8.2_343.

How can I achieve that?

snaggs
  • 5,543
  • 17
  • 64
  • 127

1 Answers1

0

this link may help you Link

Question:

I have two branches, email and staging. staging is the latest one and I no more need the old changes in email branch, yet I don't want to delete them.

So I just want to dump all the contents of staging into email so that they both point to the same commit. Is that possible?

Answer:

You can use the 'ours' merge strategy:

  • $ git checkout staging
  • $ git merge -s ours email # Merge branches, but use our branch head

hth, Martin

  • Sorry but I use GUI of SourceTree not CLI – snaggs Sep 20 '17 at 13:02
  • Sorry if that may sound harsh, but especially the more complicated operations are way easier with the CLI. Searching and posting click by click tutorials is way more effort than creating the actual command you can nearly copy+paste ;) – MartinLeitgeb Sep 20 '17 at 13:09