Search code examples
terminalbranchcheckoutrider

Checked out branch in Rider but seeing different in the Terminal


This is my first ever question here. I'm new to my role (Junior Software Engineer) and I am the first to admit this is probably a stupid question.

So, I created and checked out a new branch in Rider IDE

Rider branch

But when I check in the terminal I see my previously checked out branch

Terminal branch

Is there an obvious reason why this might be happening?

Many thanks in advance

I expected to see the same branch showing as the current one when checking both Rider and the Terminal


Solution

  • Together, we figured it out and found the problem (see the comments). The issue was related to the fact that the terminal with the corresponding Git command was opened and executed before the branch change was triggered within the IDE.

    The solution is easy: execute the shell command again after changing the branch.