How to stash changes in git

Git760

 description

When you do some work on a branch, but need to switch branches to do some work, but don't want to commit the current changes, you can try this command, save the unfinished changes to a stack, you can do any time at any time. Enable these changes on the branch.

 command

 git stash push -m "add file file6.py"

 parameter

git :    is a free and open source distributed version control system
stash :    stash changes in dirty working directory
push :    save local modifications to a new stash entry and roll them back to HEAD (in the working tree and index
-m, --message <message> :    stash message


 result

Saved working directory and index state On master: add file file6.py
Was this helpful?

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.