Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

aviaviavi/git-stashout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

git-stashout

A custom git checkout command to automatically manage a per-branch stash so you can easily switch between branches without having to either make WIP commits every time or manually stash and pop your changes.

If you often find yourself working on multiple branches and switching between them, you might be familiar with a workflow such as:

  • Do some work on branch-a
  • Not ready to commit, but need to switch to branch-b
  • git stash && git checkout branch-b
  • Do some work on branch b
  • Not ready to commit, but need to switch to branch-a
  • git stash && git checkout branch-a && git stash pop stash@{1}

If this workflow sounds familiar to you, it's where git-stashout shines!

Installing

  1. Put git-stashout somewhere in your PATH
  2. [Optional] Source git-stashout-completion to get branch completion when typing the branch name

Using

$ git stashout <branch>

This will stash your current changes, and checkout . If had a previous stash from stashout, it will be popped off the stash list so you can resume your progress. Now you have easy task switching without needing to clean up your WIP commits!

About

A custom git checkout command to automatically manage a per-branch stash

Topics

Resources

Readme

License

MIT license

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages