3 ms·
You can modify both the author date and the commit date on a commit if you need to. Git log is not trustworthy spying tool.
by onion2k 6y ago
You can modify both the author date and the commit date on a commit if you need to. Git log is not trustworthy spying tool.
- czbond 6y agoCommits should really be signed. The first time I learned of this was when a malicious update was supposedly pushed to Tesla firmware. https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work
- threentaway 6y agoYou can even require signed commits in GitHub.
- yjftsjthsd-h 6y agoIf I'm signing commits, I can sign any commit I want with any time I want, no?
- inetknght 6y agoIf others are signing commits too, good luck changing history!
- OJFord 6y agoIf it's already shared history it would be too late anyway - thread is about lying when you authored/committed. Not really sure what the benefit in cheating your boss would be though? You still had to do the work at some time. Maybe you work extra hard one day but push only the first half of your commits, then give yourself a day off where all you do is check in at the end to push the fake-timed other half of them? It'd probably be easier to find an 'unlimited holiday' job that pays you for output rather than keeping your seat warm.
- Znafon 6y agoI think only tags should be signed, Torvalds has a good discussion about signing commits vs signing tags at http://git.661346.n2.nabble.com/GPG-signing-for-git-commit-td2582986.html http://git.661346.n2.nabble.com/GPG-signing-for-git-commit-t...
- quadrifoliate 6y agoWhile I know this is possible and have done it sometimes for fun, I would never spend any appreciable amount of time doing it at a job. If you are at the point where you need to modify commit timestamps to satisfy some micromanager, it's highly likely that there are other things wrong with them that will lead to you searching for a new job fairly soon.
- ric2b 6y agoYou would if you knew it was being tracked and you otherwise liked the job, you'd even automate it. Let's not kid ourselves.
- quadrifoliate 6y ago* you knew it was being tracked * you otherwise liked the job All I was saying is that these two are very likely mutually exclusive. Sure, it's hypothetically possible that I have a micromanage-y boss who only tracks my commit times and nothing else. But really? That's the same boss who's going to mentally think you're "not a team player" because you left an hour early for your son's birthday party. That's the same boss who's going to obsessively tracks how many vacation days you "accrued" and insist on you coming in when you're sick if you don't have any left. Let's not kid ourselves.