Andrew Usher

Difference Between Git Stash and Git Commit

1 min read

git stash

The command saves your local modifications away and reverts the working directory to match the HEAD commit. It allows you to store your uncommited modifications into a buffer area called stash, and deletes it from the branch you are working on. You may later retreive them by applying the stash.

git commit

This records your change for next push and this event is recorded in history too.

If you liked this article and think others should read it, please share it on Twitter!