Wednesday, July 2, 2014

Git Apply & Revert Changes from Specific Commit

Applying is as simple as using the "cherry-pick" command:

git cherry-pick <commit-id>
This will automatically commit the change. If you do not wish to automatically commit the change:

git cherry-pick -n <commit-id>

It is also possible revert i.e. undo the changes from a specific commit:

git revert <commit-id>

Again, this will automatically commit the change. Use "-n" not to.

No comments:

Post a Comment