How to keep IntelliJ in sync with command-line branch changes?
When I change git branches at the command line, IntelliJ doesn't register the change. How do I sync IntelliJ with my git work at the command line?
For example, I created a project with master checked out (from the command-line). Then, at the command-line, I created a new git branch .. but IntelliJ was stuck on master.
When I open the Git Branches dialog and select my new branch, the only option I see is to rename that branch and cannot select it. When I check out the branch in IntelliJ (with Checkout from Version Control > Git), my command-line state becomes headless and I have to re-checkout my new branch again.
---
I should add that I see the branch change on the status bar at bottom -- but again, the Git Branches dialog does not reflect the change and the app itself does not work on that branch.
Please sign in to leave a comment.
Try calling File - Synchronize.
Changes should be s synchronized automatically unless you have it disabled in settings. Check what you have in the Preferences | Appearance & Behavior | System Settings -> Synchronization, you should have Sync file on frame or editor tab activation enabled.
Thanks, Dmitriy. I tried that ... didn't work.
I now think it's a maven problem actually. I figured out how to configure IntelliJ to use my local version of Maven but something is not quite right yet ...
Make sure to enable automatic Maven project import - see https://www.jetbrains.com/help/idea/maven-importing.html