git commit -p (a cool git command)



This content originally appeared on DEV Community and was authored by Max Cohen

I recently learned the -p option of git commit. It allows you to see your changes and decide whether to commit them.

git commit -p

Allows you to review and add changes to your commit

or, as the git documentation says

-p or --patch
 Use the interactive patch selection interface to choose which changes to commit. See git-add[1] for details.

https://lnkd.in/gaTMSuBr


This content originally appeared on DEV Community and was authored by Max Cohen