• kredditacc@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      You had this problem probably because you created your repo with the GitHub web UI?

      I always create the local repo first with git init, make at least 1 commit, and then gh repo create. And yes, my default branch would be master but why should I care if I offend some Americans.

    • JackbyDev@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      git push -u origin master and you’re done. Then in the GitHub repo change the “default branch” to master.

      Or, git branch -m main to rename locally.