Today, I encountered such a problem, tossing a half-day, is to upload their own local code to someone's remote branch.
The first thing to do is to clone someone else's project to the Local: Git clone + project address
Then go to project directory: CD + cloned project directory name
Then switch branches, git checkout + branch name ( must have the same name as the remote branch of the code you want to commit )
Then copy the code that you want to commit to the branch, and then click Execute
(1) Git Add. (Note: There is a space between the add and the period, otherwise it will be an error)
(2) Git commit-m "Change Log"
(3) Git push origin + remote sub-well-known
The first time you do this, you may be asked to enter a user name and password, and note that the user name and password are entered at this time
Upload a local project or code to someone else's GitHub (Code cloud) remote Branch