# When pushing to a non-default branch,
# you need to specify the source ref and the target ref:
git push origin branch1:branch2
#Or
git push <remote> <branch with new changes>:<branch you are pushing to>
git push origin localBranchName:remoteBranchName
git init
# Optional: create branch
git checkout -b branch_name
git add .
git commit -m "Adds existing project to GitHub remote repository"
git remote add origin https://github.com/username/example-project.git
git pull --rebase origin main
# Resolve merge conflicts if needed
git push origin main
$ git push <remote> <local_branch>:<remote_name>
git push -u origin localBranch:remoteBranchToBeCreated
git push <remote-name> <local-branch-name>:<remote-branch-name>
$ git push origin <local_branch>:<remote_branch>