PHPStorm's Git Branches are not Saved
I have PHPStorm on Ubuntu Linux connected to Github.
We have been using some specific branches on Github for the last months which worked without any problem until now.
Two days ago, they made many modifications to the branches which I could only see by clicking the refresh button in the pull dialog.
However, these new branches are shown for the current session only. Once I finish the pull operation, and try to do another one, I still get the old branches which means that I'd have to refresh the branches everytime I'd need to make a pull.
What's the problem exactly?
Please sign in to leave a comment.
Hello,
What are the names of these branches? Any specific symbols or anything like that?
Are there any errors displayed or any errors present in the log file (can be found via Help > Show Log in...)?
it has nothing to do with symbols
I had to go to app/.git/refs/remotes/origin and delete the old branches from there
thank you
> I had to go to app/.git/refs/remotes/origin and delete the old branches from there
Do I get right that this has resolved the issue?
If not, and the issue is still reproducible, please check how these branches look when you list them from Terminal. Are the "updated"?
It's just a temporary fix
The problem is that whenever the names of branches are changed remotely, new branches will be added and old ones will be kept
For example:
If we yesterday had branch 1 and branch 2, then today we deleted branch 2 and added branch 3, then after refreshing the branches in the pull list I'd end with branches 1,2, and 3. Which means that it doesn't remove the branches that were removed from the remote server. There should at least be an option for that, right? Deleting files manually shouldn't be the only way....
What does "git branch -r" within the project directory? The new ones, or the old ones?
it shows the new branches, while PHPStorm still shows both the old and new branches until I delete the old branches from the directory app/.git/refs/remotes/origin
Please invoke VCS | Git | Fetch the next time the names change, it should do the trick.