DEV Community

Discussion on: What is your favourite Git command?

Collapse
 
elecweb profile image
Elecweb
git stash
git stash pop

for keeping file changes without commit. for example, you're doing your new feature and then bug found on production so you need to switch to new branch for hot fix. you can use git stash to keep your changes on feature branch and when you finish fixing bug you can use git stash pop for get back your file changes

Collapse
 
enzoftware profile image
Enzo Lizama Paredes

This is my favorite too!!

Collapse
 
bjornbreck profile image
Bjorn Breckenridge

git stash apply

Collapse
 
jdforsythe profile image
Jeremy Forsythe

I always find myself using git stash -u so it stashes new files in addition to changed files