Enable/Disable preserving project state when switching between Git branches

Answered

How do you enable and disable the setting that preserves the state of your project when switching between different GIT branches?  I remember when I first set up IDEA it asked me if I wanted to preserve the state of my project (for example, the files you have open in the editor) when switching branches.  I thought I would like this setting but I don't and I can't find where to turn this off.  

11 comments
Comment actions Permalink

Hello Andrew,

You need to enable "Restore workspace on branch switching" option in "Settings | Version Control | Confirmation."

 

7
Comment actions Permalink

Great, thank you so much!

0
Comment actions Permalink

Is it possible to do so on global, not project level?

0
Comment actions Permalink

You could configure it in "File | New Project Settings"

3
Comment actions Permalink

Hi, seems like this feature doesn't work anymore. May be because I'm using terminal (not built-in) for executing git commands and branches switching.

 

0
Comment actions Permalink

This feature is working in the latest IDEA. 

0
Comment actions Permalink

This doesn't seem to work for me. Does the .idea folder need to be committed to version control for this to work?

 

 

0
Comment actions Permalink

Hello Sean,

Do you switch using IDE UI or using git in terminal?

0
Comment actions Permalink

Hi Yaroslav… switching in the Terminal. Does that not work?

0

Please sign in to leave a comment.