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.  

7
11 comments

Hello Andrew,

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

 

9

Great, thank you so much!

0
Avatar
Maciej Pieńkowski

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

0

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

4

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

This feature is working in the latest IDEA. 

0

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

 

 

0

Hello Sean,

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

0

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

0

Please sign in to leave a comment.