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

In git you can do `git commit --amend --no-edit` to update your last commit, in case anyone is wondering.


I don't think it updates your last commit, it just deletes it and creates a new one with the same changes (along with any new changes being amended). It's an important distinction because if you push to a remote branch that has the old commit, you need to overwrite it with the new one. Commits themselves are immutable.




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

Search: