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.
Top comments (0)