It is kinda complicated situation
I am really new to github and its workflow concept. Yesterday, I started a project on local and pushed it to my remote. The default branch name was railsAPI
. Then i tried to change the branch's name to master
, however, I messed up at this part. The branch name in my local machine is changed, but the name of the branch stayed the same on GitHub. So i decided to create a new branch called master
, set it as default branch and delete the railsAPI
branch.
On GitHub, everything looks fine. However, on my local machine, when ever i type git status
, the following message shows up:
On branch master
Your branch is ahead of 'origin/railsAPI' by 2 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
I can still add, commit and push just fine. but the fact that there exist a ghost branch on my local machine and every time I make a change, the master branch will be one more commit ahead of that ghost branch.
what I have tried: I tried to do git pull to synch with my Github, however, i got following message:
Your configuration specifies to merge with the ref 'refs/heads/railsAPI'
from the remote, but no such ref was fetched.
I tried to search on SO, but i believe my situation is different from other similar questions since that branch has been deleted, so i don't think it is a duplicate question
What I need help with : How do I clean my local repo and what caused this strange behavior?