Skip to content

Instantly share code, notes, and snippets.

View h-elbeheiry's full-sized avatar
💻
Probably Coding

Hussein Elbeheiry h-elbeheiry

💻
Probably Coding
  • Fairfax, VA
View GitHub Profile
@nepsilon
nepsilon / how-to-git-patch-diff.md
Last active April 19, 2024 13:33
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff > some-changes.patch