Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Quero mover os arquivos do branch master para main

Completei um projeto e postei no github usando um tutorial do mdn que usava o git no terminal para enviar para o github, mas ao fazer isso ele criou um branch master no github sendo que eu queria que estivesse no branch main, como faço para enviar os arquivos por completo do branch master para o branch principal que é o main? Já tentei git push origin main na branch main do git, mas deu erro.

 ! [rejected]        main -> main (fetch first)
error: failed to push some refs to 'https://github.com/isacwesley/Codificador-decodificador.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
1 resposta
solução!

tentou esse comando ? git push origin master --force