HN italics markup is mangling your code – indent the code block to fix :)
like so!
> save current changes before switching branchesAlso: why this over a stash? Stashing fundamentally just creates a hidden little commit with all your unstaged work on it. It does have one advantage over your approach, which is easily applying the work to another branch.