Saber2pr's Blog

CheckTheContentOfTheLastChangeSubmission

Get the latest commit of the branch:

git rev-parse master

# 获取上一次commit
git rev-parse master^

Get file changes:

# git diff commit1 commit2
git diff $(git rev-parse master) $(git rev-parse master^)

# 指定文件
git diff $(git rev-parse master) $(git rev-parse master^) src/index.ts