how git submits local code to a remote branch
- A new project has been created locally
- then our boss set up a warehouse for git. My permission is develop, and then there are two branches in the warehouse, one master (I certainly don"t have permission), another Branch_V1.20180611 (which I should be able to operate), a readme, in the branch, and then all kinds of questions that I am not allowed to submit when I submit the code
question
- how to submit the local code to the git warehouse set up by our boss. Although I finally submitted it.. But I don"t think it meets the requirements of the specification. Ask the boss for advice on how to submit such code.
I have tried: (this will meet my requirements)
- git init;
- git remote add origin https://**.git;
- git add. ;
- git commit-m "XXX"; / / remember the commit id here
- git checkout Branch_V1.20180611;
- git cherry-pick [commit id] / / the code has been successfully closed, and it can also pull and push
I have also tried:
- first associate the remote branch, then git push-u origin master, but I can"t submit without permission
- after associating the remote branch first, directly git branch-- set-upstream-to=origin/Branch_V1.20180611 master, this association will not work either.
- after associating a remote branch first, it is not possible to directly git push origin master.