DEV Community

Discussion on: Useful tricks you might not know about Git stash

Collapse
 
freeatnet profile image
Arseniy ✌️ Ivanov

Saving untracked files or specific paths is πŸ”‘:

git stash save -u -- <path…>

Collapse
 
onecuteliz profile image
Elizabeth Jenerson

πŸ˜’
You ain't lying. Made the mistake of git clean w/ unsaved untracked files cause I was a noob. πŸ™ˆ

Collapse
 
freeatnet profile image
Arseniy ✌️ Ivanov

😟

I too learnt the hard way to use clean -n (dry-run of clean that just outputs what it would remove) before actually running it.