有时候需要在cherry-pick时保留原始修改时间
function cherry_pick_with_date() {
_commit=$1
shift
_date=$(git log ${_commit} -1 | grep -Po 'Date: +\K(.*)')
echo "Date: ${_date}"
git cherry-pick -n ${_commit}
GIT_COMMITTER_DATE="${_date}" GIT_AUTHOR_DATE="${_date}" git commit $*
}