git stash
Stashes changes with name worked on add function
git stash save "worked on add function"
Shows all the stashes with unique IDsgit stash list
Takes stashed changes back (does not delete the stash after applying)git stash apply stash@{0}
Applies the most recent stash & deletes the stashgit stash pop
Drops the specified stashgit stash drop stash@{0}
Deletes all stashesgit stash clear
worked on add function
git stash save "worked on add function"
git stash list
git stash apply stash@{0}
does not delete the stash
git stash pop
git stash drop stash@{0}
git stash clear
git stash
on one branch and then git stash pop
on another branch (to commit changes on another branch)git add --all / git add -A
-A
is a short handhand notation for --all