Skip to content

Instantly share code, notes, and snippets.

@WORMSS
Last active October 20, 2021 10:18
Show Gist options
  • Save WORMSS/97da6baac7ccbc6f29b7455792824a3f to your computer and use it in GitHub Desktop.
Save WORMSS/97da6baac7ccbc6f29b7455792824a3f to your computer and use it in GitHub Desktop.
Git Commands I usually forget but need maybe once every 2 years

Git Get Remote Sha:

$ git fetch origin <sha>

Git Octopus merge staging:

Make sure the staging area is how you want the commit to be

$ git write-tree
<staging sha>

$ git commit-tree <staging sha> -p <parent1> -p <parent2> .... -m "Message"
<commit sha>

$ git reset --hard <commit sha>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment