Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Another frequent use I have, applying random diffs with git:

    git diff | pbcopy
    pbpaste | git apply


You can also use `git format-patch` and `git am` if you want to apply the same commit to multiple repos, a use-case I sometimes I have.


I should use `git format-patch` instead of creating a mock draft PR (which I end up deleting) and modifying the URL to add `.patch` and then downloading the patch file haha. `git format-patch` would probably be faster :)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: