Skip to content

Instantly share code, notes, and snippets.

View bgranzow's full-sized avatar

Brian Granzow bgranzow

  • Sandia National Laboratories
  • Albuquerque, NM
View GitHub Profile
@simon04
simon04 / git.sh
Created January 14, 2020 07:16
Git merge/replace orphan branch into master
git checkout --orphan new-framework
# completely rewrite your application in new framework
git merge --strategy=ours --allow-unrelated-histories master
git commit-tree -p HEAD^2 -p HEAD^1 -m "Merge branch 'new-framework'" "HEAD^{tree}"
git reset --hard $OUTPUT_FROM_PREVIOUS_COMMAND
git checkout master
git merge --ff-only new-framework