3 ms·
Why would GitHub prevent commits from the future? Git allows commit dates from the future and from before git was invented, and GitHub's job is to store git rep
by Kwpolska 4y ago
Why would GitHub prevent commits from the future? Git allows commit dates from the future and from before git was invented, and GitHub's job is to store git repositories.
- pmontra 4y agoLocally git can't tell if the clock is in the future, unless it starts checking ntp servers or the like. However it's not its own business IMHO. As a collaboration tool GitHub might refuse timestamps too much in the future, at least as an optional setting of the repository. If a coworker inadvertently moves the clock forward by an year when looking for the day of next new year eve, then makes a day worth of commits and pushes them, we'll have to delete those commits and make them again with the correct date.