Yeouch! If it's not clear to you that this is a dangerous hack, ask a friend or a coworker why rewriting git patches is probably not what you want! \(a\/\|b\/\|^ create mode \d\+ \|^ rename \|=> \|^rename \(from \|to \)\)\@<=$PATH_IN_QUESTION/