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

Never use git push —force. Alway use git push —force-with-lease.

Then if someone changed your remote branch, git will always let you know :)



Been using git every day for ten+ years and I never knew about --force-with-lease.

That's great to have learned, thanks!




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

Search: