Committing partial changes from file in Git

git add -p file 
-p stands for patch mode, You can also use
git add --patch  file 
This gives the user a chance to review the difference before adding modified contents to the index.


Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Difference between Validations, Callbacks and Observers