2

I'm trying to create a diff file (patch) between two commits. I'm trying the command

git diff 62fe9db 7661a06 > ~/Desktop/patch

but the file created is empty. When I run the above command, since I'm using p4merge as my external diff tool, p4merge opens and shows me the diffs. But after closing p4merge, I find that the patch file is empty.

What am I doing wrong?

0

1 Answer 1

2

The syntax for creating a patch using git is git diff -p <commit> <commit>.

The git --help diff documentation has an option that will cut out the external diffing tool -

--no-ext-diff
    Disallow external diff drivers.

That may fix your issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.