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

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.


Git works on content hashes so it won't see your change and I doubt it has that functionality. I'd recommend that you echo the current date into that file rather than relying on modified date.

As a sideonote, relying on modification date is going to cause you many more problems as local time can be different between machines.


This will update hash and timestamp of last commit, without any changing or message dialog.

git commit --amend --no-edit

Tags:

Git

Timestamp