Actions

EmSys

Git - Git and Patch files

From EdWiki

Git and Patch files

git diff HEAD^^
  • Show what has changed in last two commits
git diff HEAD~10..HEAD~2
  • Show what changed between 10 commits ago and two commits ago
git format-patch HEAD^^..HEAD
  • Will create individual patch files per commit
git apply
  • To apply patches
git am
  • To apply patches from an mbox
  • Can also compare
    • Between specific objects
    • To branches/tags