Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

git reset --hard can be pretty destructive when applied at the wrong moment. When reverting changes in selected files, my preferred way is to use git checkout selectively.


Agreed, and there's also git restore now, which might be a bit more intuitive.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: