Jeffrey's Log

Archives | Subscribe


Diff & Patch: An one minute tutorial

Published on: September 27, 2008

Share on      


Most of us working in open source projects need to generate modification on a special part of code.

After making changes we need to send it. Only the difference in the file is needed to be sent.

So how to create a difference(diff) file ? Simple .Follow these steps

**_diff X.c X.c > “diff file”_**

Here diff file may be X.c.diff. __

X.c is a c language file.**_

_**

Now if we receive the diff file, how to join(patch) it with our orginal file? See below

patch X.c X.c.diff


Comments

Comments can be emailed or tweeted to me. I would like to hear them and will try to reply.


Made using Jekyll, Twitter Bootstrap, Code Prettify and Font Awesome.

Copyright (C) 2008 - 2021 Jeffrey.