Hamed Ezati
Hamed Ezati

Reputation: 79

How to recover master branch on the repo?

Master branch is not exist in the remote repository: (it was there as well in the past)

enter image description here

But it still exists in the local:

enter image description here

And when I want to push it on the remote repository, it throws error:

enter image description here

Any idea how can I make the master branch on the remote repo? When I want to create it as a new branch through the gitlab interface, it says "master" is not an allowed name.

Upvotes: 0

Views: 82

Answers (1)

Richard
Richard

Reputation: 2355

Change your branch name from master to main.

If you are still having issues after the branch rename, simply rename your local git folder, and clone a fresh copy.

https://about.gitlab.com/blog/2021/03/10/new-git-default-branch-name/

Upvotes: 1

Related Questions