Git Gui push to branch "main" instead of "master"

6.4k Views Asked by At

Git Gui by default only allows me to push to the branch master, but I would like to push to the branch main.

When I push I am just asked:

enter image description here

So the main branch does not appear.

I still have some old Git-projects where we use a master branch, but in the new Git Projects we use the GitHub default main branch.

1.) How can I choose the branch I want to push to in general? (Basically the same question as in Git GUI push to specific branch, but with focus on the main branch. A detailed beginner friendly answer would be nice, since I have never used multiple branches before GitHub changed from master to main. For example I don't know how to checkout another branch in Git Gui. I think I created the master branch with Git Gui automatically unintentionally? Maybe it would be better to delete the master branch and only use the main one?)

2.) Can I make the main branch my default branch instead of master. Do more up to date versions of Git Gui do this by default?

0

There are 0 best solutions below