Git smart checkout

来源:互联网 发布:淘宝类的app难做么 编辑:程序博客网 时间:2024/06/05 20:46


down votefavorite

Intellij has a feature that's very cool in theory, called Smart Checkout. This feature kicks in when you're changing branches and you have files in the current branch that you've modified but haven't committed.

Instead of forcing you to commit, stash or shelve your changes, it stashes them for you, switches branches, then runs stash pop in the new branch.

I guess this is what you'd want sometimes, but I ran this when switching to the wrong branch.

So, now my master branch is all full of changes that belong in another branch, some files are reporting merge conflicts, and I have all kinds of pain.

What I want to accomplish is:

  1. Cleanly remove the changes from the master branch.
  2. Move them back to the branch where I was working.

Is there a way to do this?

0 0