Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've used that workflow too. What disturbs me about the `git switch` proposed here is the unstashing. I think the intended optimization is more general: when you're trying to switch to another branch for any reason but git doesn't let you because of unsaved changes. But your use case of being on the wrong branch seems like the actual optimization for a fairly (at least for me) uncommon workflow. More frequently I, like you, stash and switch, then possibly do something (or not) like immediate bug-fixing, then switch back and unstash only then.


There's nothing stopping you from using regular `git checkout` in that case :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: