My Dev branch is removed from (branch based on origin/dev-branch, but upstream is gone)

I am new to using gitlab, I tried to search but didn’t find the same related topic.
On using the web UI, I created the Dev_Branch:
—> origin/master branch.
--------> Dev_Branch (Created from master branch, after working on master branch)

My team is working on Dev_Branch along with me. We use Pycharm for python development.
The team is using Dev_Branch for few days.

Today, I can’t see the Dev_Branch in the Website.
I did run in my gitbash -

@DESKTOP-J3XXXX MINGW64 /c/dev/sapas-telematics (Dev_Branch)
$ git branch -r
origin/HEAD -> origin/master

@DESKTOP-J3XXXX MINGW64 /c/dev/sapas-telematics (Dev_Branch)
$ git branch -a

  • Dev_Branch
    remotes/origin/HEAD -> origin/master

@DESKTOP-J3XXXX MINGW64 /c/dev/sapas-telematics (Dev_Branch)
$ git status
On branch Dev_Branch
Your branch is based on ‘origin/Dev_Branch’, but the upstream is gone.
(use “git branch --unset-upstream” to fixup)

Changes to be committed:
(use “git restore --staged …” to unstage)
deleted: .idea/shelf/Uncommitted_changes_before_Update_at_16_09_2020_18_25__Default_Changelist_1.xml

Changes not staged for commit:

@DESKTOP-J3XXXX MINGW64 /c/dev/sapas-telematics (Dev_Branch)
$ git branch --unset-upstream

Looks like, i have lost the branch on the

  1. How do i restore the Dev_Branch on the so everyone can check-in their code to this branch?
  2. Where can i see the branch information? I am considering that this branch is deleted.
  3. there is lot of checked-in code in Dev_Branch, how can i get that?
    i want to restore the Dev_Branch and start checkin the update.
    What i should do in future that this does not happen again.

Thanks in advance.

Pushing your branch should recreate the upstream, no?

this problem may be caused by a merge request which checkbox on “delete source branch…”


in that case, just push your local branch again and remember not to check this box next time