Now you can use "Meld tool" to compare between files to refresh the patch. Here you can compare between the source file generated in step 2 (which will have the required changes) and the source file generated in step-3 (which will have the patch appied on to it).
During comparing between source files make sure that you take only the required changes (changes available in actual source file step-2) to the patched file generated in step-3.
Once all changes are taken , you can verify the patch by checking the option file/format as patch in the tool. Save the updated file and copy it to your repo (repo generated in step-2).
Now in your repo , you will have 2 source file (for ex: one will be index.php --original file with the required changes and index_bk.php --updated file with patch applied and also your changes).
In terminal , you can use command "diff -ruN file1 file2 > new_patch_file.patch" to generate a new patch.
For ex : diff -ruN index.php index_bk.php > new_index.patch
In case patch file has more than one file, then append the difference using diff -ruN next_file nextfile_bk.php >> new_index.patch
Step 5 :
Open the newly created patch file, update the file location correctly and save it. For ex :