Git error series-fatal: The current branch develop has no upstream branch.

fatal: The current branch develop has no upstream branch.
Fatal: The current branch of development has no upstream branch.

Solution:

  1. git push --set-upstream origin remote branch name
    Explanation: origin is the label that git creates for you to point to the remote code base when you clone the remote code, which points to the repository. In order to clearly understand the repository you want to point to, you can use the command git remote -v to view it
  2. git push -u origin remote branch name

The difference between the two commands is that the first command is to ensure that your remote branch exists, and if it does not exist, it cannot be associated. Even if the second instruction does not have the branch you want to associate remotely, it will automatically create one to achieve association.

Guess you like

Origin blog.csdn.net/zqd_java/article/details/118079439