How to write the modification time to the submission time of the modified file according to the git submission record
This article mainly explains how to write the modification time to the submission time according to the git submission record. Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "how to write according to the git submission record modification file modification time to the submission time"!
Git ls-tree-r-name-only HEAD | while read filename; do
Touch-d "$(git log-1-- format="% ai "- -" $filename ")" $filename
Done
At this point, I believe you have a deeper understanding of "how to write the modification time to the submission time of the modified file according to the git submission record". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!