How do I fix CGit’s display of a repository’s time of last update?
If you copied Git repositories into CGit at one point, you may have done so without keeping their mtimes intact. In this case, CGit will display an incorrect time of last update for the affected repositories, as it does not determine it based on the most recent Git commit but rather the time the default branch was last touched on the local file system.
By default, CGit uses the mtime of
refs/heads/master (assuming that
master is your default branch) to determine the time of last update, so this is how you can fix the time to be the same as the commit date of the last commit:
touch -c refs/heads/master -t $(date +"%Y%m%d%H%M.%S" --date=@$(git show -s --format=%ct HEAD))