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
2. Apply the diff:
Then copy this patch to your local machine, and apply it to your local working copy with:
git apply /path/to/some-changes.patch
And that’s it! The changes are now in your working copy and ready to be staged/commit/pushed :)
Hello. I have a patch diff in .diff format, git give me errors when I apply it and I want to manual solve the errors.
How can I view what the patch is trying to do and my local state of the project in diff mod so that I can fix the changes manual