gittimestamp

Is there a "git touch" so I can push the same file with a new timestamp?


I have an automated build tool that uses the modification date of the file in the output. Is there a way to "git touch" the file and save that to Git without having to actually modify the file?


Solution

  • I think what you need is touch command if you are on unix operating system.

    Git can however allow you to do a empty commit if you use --allow-empty option.

    Eg. $ git commit --allow-empty -m "Trigger notification" would cause an empty commit which you can then push and do another deploy.