3 ms·
But if the remote has advanced since you pushed, you'll still need to reflog on the remote server, right?
by jordigh 11y ago
But if the remote has advanced since you pushed, you'll still need to reflog on the remote server, right?
- lmm 11y agoSomeone must have pushed the version the remote was at, so the correct commit would be on someone's devbox.
- mmanfrin 11y agoIt was a series of PRs merged on github, no one in the office had a current branch of develop.
- dsp1234 11y agoIt looks like you can use the GitHub API to get the events for the specific repo, which would include your force push, and the hash of the previous commit. Some instructions at https://objectpartners.com/2014/02/11/recovering-a-commit-from-githubs-reflog/ https://objectpartners.com/2014/02/11/recovering-a-commit-fr... edit: This should be in reply to jordigh's comment above
- lmm 11y agoIf it's just a matter of "merging" couldn't you just merge those branches again? Or do you resolve conflicts on github or some such (something that's never fit my workflow but I can imagine others using it)?
- erikb 11y agoThat's really the point. The guy who made the last change should have it locally as well. Even if he git pulls first.
- bicolao 11y agoDuring any push, the remote advertises latest SHA-1. I don't know if we actually use it in 'push -f'. But if we haven't, it's a good idea to save this in local reflog.