Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save BillyNate/32fee749856df3f74c4a97fb099d45a5 to your computer and use it in GitHub Desktop.

Select an option

Save BillyNate/32fee749856df3f74c4a97fb099d45a5 to your computer and use it in GitHub Desktop.
  1. Stage the files for commit (git add the files)
  2. Write the tree (this only creates a tree object, returning the SHA of the new tree): git write-tree
    • Optionally: examine the new tree: git ls-tree [SHA]
  3. Create the commit: git commit-tree [SHA] -p [PARENT-SHA] -m "Commit message" (add as many seperate -p [PARENT-SHA] as you want (makes it look like a merge))
    The SHA of the new commit will be given to you on succes
  4. Finally, merge the new commit into you branch git merge [NEW-SHA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment