Skip to content

Instantly share code, notes, and snippets.

@topherPedersen
Created January 30, 2020 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save topherPedersen/bda18cfa8947ecc65abf4fb92bde92f3 to your computer and use it in GitHub Desktop.
Save topherPedersen/bda18cfa8947ecc65abf4fb92bde92f3 to your computer and use it in GitHub Desktop.
Merge Previous Commit to Master
// From "merge -s ours" on YouTube by Colten Jackson
// https://www.youtube.com/watch?v=HkTlVCMo6_k
$ git checkout 1234321
$ git merge -s ours master
#### that merge will leave you in detached head, use "git log" to get latest commit hash, shown here as 9876789 #####
$ git checkout master
$ git merge 9876789
$ git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment