Enterprise git push workflow

The difference between general and personal private repositories is that there will be a mr (merge request) process
in the middle. Generally, personal use of git repositories is to register an account for free on github.com/gitlab.com, log in and create a new repository and push the code to the repository. Yes,
but the company’s warehouse will set up a process of reviewing and submitting code, so there are generally two ways to push the local code to the remote warehouse:
1. Via the fork (recommended)
""" Another blog post: git pass Push the code in the way of fork
2. Do not use fork (not recommended, you will find various problems when pushing , it will take a long time to solve)
git submit code steps:
1. git clone clone the remote warehouse code
2. cd into work Directory
3. git branch yourbranch to build a branch of your own
4. git checkout -b yourbranch to switch to your branch
5. git add/rm xxx.txt to submit the code to your branch / delete files on the remote branch
6. git commit -m "message" Commit the changes to the local warehouse
7. git checkout master switch back to the master branch
8. First git pull once to see if there is any changed code
9. git merge its own branch merge branch
10. git push origin master: remotebranchname
11. Copy the submission link, visit, fill in the submission information, and submit for review

Guess you like

Origin blog.csdn.net/qq_36875803/article/details/110589301