复制如下代码生成一个脚本文件, 并赋予执行权限, 即可happy的生成patch并同时保存原文件及修改后的文件:
#!/bin/bash
if [ $# -lt 2 ]; then
echo "please give me two branches name or two commit id"
exit 1
fi
if [ ! -d .git ]; then
echo "no .git dir at all"
exit 1
fi
OLD=$1
复制如下代码生成一个脚本文件, 并赋予执行权限, 即可happy的生成patch并同时保存原文件及修改后的文件:
#!/bin/bash
if [ $# -lt 2 ]; then
echo "please give me two branches name or two commit id"
exit 1
fi
if [ ! -d .git ]; then
echo "no .git dir at all"
exit 1
fi
OLD=$1