When git manages the remote warehouse branch-- does set-upstream-to always report an error?


I don't know exactly what you want to achieve. If you just want to know why this command is wrong, literally set-upstream-to is to set the tracking branch of the current branch , feeling that you need a parameter , that is, the branch to be tracked:

git branch --set-upstream-to origin/dev

set-upstream literally means to set the tracking branch of what branch is , so it is followed by two parameters , that is, local branch name and online branch name .
so to replace set-upstream with set-upstream-to , you need to first switch to the local branch where you want to set the tracking branch, and then use set-upstream-to to set the online branch you want to track:

git checokut dev
git branch --set-upstream-to origin/dev
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb1f16-470d8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb1f16-470d8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?