« Back to Index

Get a git diff and apply git diff using gist ruby gem -> https://github.com/defunkt/gist (also see this alternative using git format-patch: https://gist.github.com/Integralist/87852ced09d7918322c0)

View original Gist on GitHub

git apply gist diff.sh

git show HEAD HEAD~1 # (or use a hash instead: `git show {commit} {commit} {commit}`)

git diff --cached | gist -p -f test.diff

curl https://gist.githubusercontent.com/anonymous/x/raw/x/test.diff | git apply

curl https://gist.githubusercontent.com/anonymous/x/raw/x/test.diff | git apply --reverse