Skip to content

Codespaces opens master branch by default? #26009

Discussion options

You must be logged in to vote

Codespaces persists your git state similar to your local machine, so if you have a branch in your codespace that is deleted in your repo, it won’t be deleted in your codespace by default. If you were to fetch, the main branch should be available in this scenario.

When you create a codespace from github.com/codespaces, it will use the default branch. If you create a codespace from the repo view or PR, it will start from the ref that you are currently viewing (so if you’re viewing branch foo on a repo, it will create a codespace off that branch). You can always switch branches in a codespace, so you aren’t tied to the branch you currently created a codespace from.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants