Thread:Talk:Git/Workflow/Helpful script, switch between branches with intermediate rebase

I wrote this to help switch between branches, I call it "git-scuttle". Check it out:

Put this in a file named "git-scuttle", make it executable, and put it in your path. Then, simply running

will bring you back to master with no pending changes (and anything you forgot will be stashed safely). If you want to switch to a different branch,

will bring you there (and create it if it doesn't exist).