Reputation: 13
One of my coworkers was testing a new feature he was adding and had to reset his windows time to 2 days ago. When he completed his feature he committed and pushed without setting his date back to today...
Now the structure of develop is really messed up with my local one up to date but showing me that I need to pull 2 new commits that are from the past.
We have no idea how to fix this.
I assume we have to somehow reset/rebase the last 2 commits on origin and push them back with the right time. Because as it looks now, he managed to create an entire new develop branch with just those 2 commits that he pushed.
Upvotes: 1
Views: 63
Reputation: 40760
Commit timestamps in git are pretty much purely cosmetic -- there's nothing internal that uses them, but some clients might order the display of things using times to help. So if all that's wrong is the timestamps, I'd encourage you to chalk that down to experience and keep going.
If, on the other hand, you actually do have issues with the structure of your commits on your branches, you've got bigger issues and your question doesn't have enough information to diagnose it. My recommendation is to create a new clone (probably using --mirror) and to examine it using gitk --all
. You might also want to take a look at your reflog to try to work out what your commits should look like. Hopefully then you can work out how to get from what you've got to what you want to have.
Upvotes: 3