5 ms·
git push --force It doesn't actually delete the commits, but you can't find them anymore if you don't remember the hash of the former head commit of the branch
by progval 8y ago
git push --force
It doesn't actually delete the commits, but you can't find them anymore if you don't remember the hash of the former head commit of the branch
- Schnouki 8y agoUnless you use git reflog.
- progval 8y agoBut you can't run it on GitHub's side.
- ComputerGuru 8y ago`git reflog` is your friend; provided not too many operations have since passed.
- deleted 8y ago[deleted]
- tome 8y agoAs ComputerGuru and Schnouki explain, one can use the reflog. For anyone who's intimidated by the reflog, perhaps my recipe under "All the things your branch has ever been" will help. http://h2.jaguarpaw.co.uk/posts/git-survival-guide/ http://h2.jaguarpaw.co.uk/posts/git-survival-guide/