Rephrase: I would like to find the two last commits that changed a specific file (or folder, or group of files if possible) and perform a diff between those two commits. All in one command.
Thanks, this is going to save me time when I try to visualise what are the changes in data files that I re-populate with new scripts.
git diff $(git log --format='%H' -2 -- "$path")
path
显然是您要检查的文件的路径。
git diff $(git log -2 --oneline -- MyFile.txt | cut -d " " -f 1)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.