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.
This content originally appeared on DEV Community and was authored by Max Cohen
Max Cohen | Sciencx (2024-08-16T03:38:59+00:00) git commit -p (a cool git command). Retrieved from https://www.scien.cx/2024/08/16/git-commit-p-a-cool-git-command/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.