Skip to content

Instantly share code, notes, and snippets.

@Geri-Borbas
Last active November 20, 2018 11:45
Show Gist options
  • Save Geri-Borbas/46d74f3a22c15118b26bdd24da5de9ef to your computer and use it in GitHub Desktop.
Save Geri-Borbas/46d74f3a22c15118b26bdd24da5de9ef to your computer and use it in GitHub Desktop.
How to patch a repository called `Project` with another folder.

How to patch a repository called Project with another folder

  1. Add the 2 suffix to the Project folder containing the patch changes.

  2. Copy the folders beside each other, open terminal.

  3. Navigate to the folder that contains them both.

  4. Create patch file there.

diff -ur --new-file --exclude='.git' Project Project2 > my.patch

Using --new-file will add / remove any file changes.

  1. Open up Sourcetree, click patch, select patch file.

  2. Strip 1 (if needed), Click Apply, Sourcetree will figure out the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment