To push the current branch and set the remote as upstream code example
Example 1: git push set upstream
git push --set-upstream origin <branch>
Example 2: $ git push fatal: The current branch favicon has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin favicon
git push -u origin --all
Example 3: the current branch has no upstream branch error
git push -u main --all
Example 4: git configure upstream for branch push and pull
$ git push -u origin HEAD