Manually updating a fork

This is the method I apply for updating a fork of a software project when a new release of the master project appears.

Origin
I developed this method during my work on SWiM, which is being maintained as a fork of IkeWiki.

How to do
Merging the differences between master-oldversion and master-newversion to fork:

diff -Bbr prog-{oldversion,newversion} >| prog.diff awk '/^diff/ {print $3}' prog.diff # All changed files egrep '^(Files|Only)' prog.diff A=$PWD/prog-oldversion B=$PWD/prog-newversion C=$PWD/fork function merge { kdiff3 -m {$B,$C}/$1 -o $C/$1 } # or meld or whatever screen # Work environment: upper half diff output, lower half command line \cp -v {$B,$C}/path/to/file merge path/to/file
 * 1) Assuming sub-directories prog-oldversion and prog-newversion
 * 1) View the diff file with a text editor, e.g. vim
 * 1) Tough cases first:
 * 1) Preparing the merge
 * 2) Directories
 * 1) Discuss variant for renamed files (using if)
 * 1) vim keyboard macro to copy the relative file path out of a "diff ..." line:
 * 2) diff -Bbr prog-old/path/to/file prog-new/path/to/file
 * 1) f/l"+yt_ (_ = space)
 * 1) Simply overwrite new files or binaries
 * 1) For all changed files:


 * Works well for files with few changes in the fork compared to prog-oldversion
 * For files, where I have changed a lot, creating and applying a patch is probably better
 * Be careful about refactorings!