DEV Community

Discussion on: 20 Git Commands Every Developer Should Know

Collapse
 
joolsmcfly profile image
Julien Dephix

I sometimes use git rebase -i HEAD~N to rebase the last N commits interactively. From there you can decide what action to apply on each commit: pick, reword, squash etc.

Some open source projects enforce single commit pull requests so it comes handy then and makes it easy to squash commits.

Collapse
 
jessekphillips profile image
Jesse Phillips
Collapse
 
krishnaagarwal profile image
Krishna Agarwal

Thanks for sharing

Collapse
 
krishnaagarwal profile image
Krishna Agarwal

Thanks
I'll add it