5 ms·
Even w/o the distributed stuff, git reflog has your back. Once something has been comitted, you have to try pretty hard to really lose it.
by dilap 13y ago
Even w/o the distributed stuff, git reflog has your back. Once something has been comitted, you have to try pretty hard to really lose it.
- Anderkent 13y agoThat's only if you have ssh access to the server. I don't think there's a way of seeing the reflog of a remote? I.e. if you're using github and the branch only lives there, can you undo an overwrite?
- dilap 13y agoOh, interesting, I think you're right. That's a bit unfortunate actually!
- darklajid 13y agoI guess I am missing something. There is no 'server'. You should have the same reflog locally, if you pulled before someone messed the repository up?
- luchs 13y agoThe 'server' in this case is a remote repository which has some commits you don't have. If you force push to this repository, these commits will be lost for you - only the person who pushed these or someone with access to the server can restore them.
- eridius 13y agoIf you have the output from your `git push -f` you can, because it outputs both the old and new ref for each modified branch.
- judk 13y agoToday I suddenly realized reflog is "ref log" not "re flog". My world just got a bit less magical.