

# Replace any forward slashes in the branch name with a reverse slash Not really needed in zsh, but handy to haveĪlias gitcb='git rev-parse -abbrev-ref HEAD' Enter some handy aliases: # Print the current branch. Seems pretty simple, right? However, I may want to create several patch files and don't want all the bother of renaming files after they are created. Create a patch file with something like git diff -patch -staged.I think I've finally come up with a solution I like. They can easily be accidentally deleted - looking 👀 at you git stash pop. Additionally, I don't like the fact that stashes are ephemeral.

I do use stash some, but I'm not really a big fan of it - mostly because it doesn't solve problem #2 or #3. So, I want to be able to easily references them sometime down the road even on a different project.įor #2, you might suggest git stash.

Sometimes, I really like a solution or the ideas currently in code but don't actually use them in the final commit.I'm afraid I'll lose my changes due to Visual Studio Code's ability to undo even after saving "feature" 😠, a mistake in my rough git knowledge, or losing my computer due to a crash, theft or the zombie 🧟 apocalypse.I do a lot of experimenting with code and don't commit changes until I've got the solution I want.While developing, I have two fears/work flows that I've tried several ways to overcome or improve.
