I'm trying to switch another branch but I keep staying on a detached head or no branch.
What I tried:
Switch/Checkout:
Getting:
But if I want to commit, I'm still on no branch:
And if I try to pull this branch instead:
I'm getting:
And I'm still on no branch...
How can I actually go back to the portalGraphs branch?
You tried to directly checkout a remote tracked branch. In the git philosophy this is not possible and git checks out a so-called "detached HEAD", i.e., you are not an a branch but the revision will be your HEAD (cf. Why does Git tell me "Not currently on any branch" after I run "git checkout origin/<branch>"?).
When you opened the switch/checkout dialog and you selected the remote branch, the "Create new branch" checkbox was automatically selected. This would create a local branch on the version of the remote branch. See
A quick way to fix this is to go to the switch/checkout dialog and select a local branch, such as master
OR select "new branch" on the commit dialog.