Skip to content

Instantly share code, notes, and snippets.

@lmmendes
Created February 23, 2016 12:41
Show Gist options
  • Select an option

  • Save lmmendes/214551fe02645200ffd9 to your computer and use it in GitHub Desktop.

Select an option

Save lmmendes/214551fe02645200ffd9 to your computer and use it in GitHub Desktop.
Change the current branch to master in git
git checkout better_branch
git merge --strategy=ours master # keep the content of this branch, but record a merge
git checkout master
git merge better_branch # fast-forward master up to the merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment