What happens if you make changes to the same line simultaneously?
error: failed to push some refs to [your-url]
main
branch, while your local repository has master
git branch -m main
to rename your local master
to main
push
and pull
commandspush
and pull
commands?
git remote add origin
.git pull origin main
: After adding a remote, we don't yet know which branch to pull from. main
(or master
!) is the default branchgit push --set-upstream origin main
: In the first push
, we decide which branch to link our current branch into.git push
and git pull
.