I received a diff patch for a project I'm working on and I want to know if there is a simple way in Visual Studio Code, to apply that diff to the file it is referred to?
Visual Studio Code has added some git support in the last few versions.
I don't want to use git command line tools (I won't reject answers but will not accept them as solutions).
For example, I want to know if I can right click on the main source file and select an option, "Apply diff patch" and it opens a file dialog allowing me to select the diff file and apply the changes.
I also have Github Desktop available to use but that doesn't seem to have an "Apply diff" option either.
Thanks in advance.
I have seen this related post:
When I run the git command I get an error:
directory$ git apply xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Update: The error above went away after installing XCode command line tools (more info here, https://www.studytonight.com/post/solved-mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun). But the apply command still seems to have done nothing.
Update2: It appears that I have to address the different folder structure used in the diff patch. See https://mcmap.net/q/63595/-how-do-you-take-a-git-diff-file-and-apply-it-to-a-local-branch-that-is-a-copy-of-the-same-repository.
Git Patch for Visual Studio Code looks like what I'm looking for. However, here is the error that I see when using it.