DEV Community

Max Cohen
Max Cohen

Posted on

git commit -p (a cool git command)

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.

Enter fullscreen mode Exit fullscreen mode

https://lnkd.in/gaTMSuBr

Top comments (0)