git checkout 'master@{7 days ago}' -- path/to/file.txt
This will not alter HEAD, it will just overwrite the local file path/to/file.txt
See man git-rev-parse for possible revision specifications there (of course a simple hash (like dd9bacb
) will do nicely)
Don't forget to commit the change (after a review...)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…