it is simple I just do the git checkout branch-name and after 3 seconds my current branch is master again. steps:
- git checkout branch-name
- wait 3 seconds
- git goes back to branch master
I used git config --list to see my credentials and it was correct, the main repo has in bitbucket.
Obviously : some other process is doing something to your git repository.
If your repo is placed in a synced directory, for example (Onedrive, Google cloud, Dropbox ...), since all your git's state is stored in files, an automatic update of the
.git/
folder could (if done in the wrong direction) move back info like the checked out branch, or the stored files ...If your repo is placed in a shared folder, someone else running actions would also modify what you see.
If a cron job, or a hook triggers some action on your repo, it could switch your active branch back to master.
etc ...