When People clone this specific visual studio online repo, instead of getting the expected master
branch, they're getting a branch called initial
.
I would like the branch called master
to be the default branch that gets checked-out when cloning the repository.
Indeed, when running git branch -a
i'm getting the following result:
remotes/origin/HEAD -> origin/initial
remotes/origin/initial
remotes/origin/master
Which basically confirms that HEAD points to initial.
Also note that I do not have direct access to the remote file system (as it's hosted on visual studio online).
In github.com it's possible via the web portal, but I didn't find a similar option in visual studio online.
How can i change the remote repository to the following state?
remotes/origin/HEAD -> origin/master
First, right click on the remote branch, and select New Local Branch From on the context menu, just as if you were creating any other branch. The Create Branch window section will appear. Note how Visual Studio auto-populates the name of the local branch as `for-review` You could change the local branch name.
Change default branch, you can navigate to Repos>Branches>Ellipsis button> Set as default branch button.
In Web Access, navigate to the repository in question. In the repository drop-down, select "Manage repositories...":
On the left side of the repository management page, you can expand the repository to see the branches. Select the branch you want to make the default branch, right-click and select "Set as default branch".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With