Git code Warehouse Management experience Summary Set

Source: Internet
Author: User
Tags comments commit
summarize and organize git usage considerations 1. Code Submission Process

The code submission process needs to be strictly adhered to, not only to improve efficiency but also to avoid errors.


git branch Check if the current branch is in master, and if it is not in master, use git checkout master to switch to master; git pull Origin master, pulls up the latest master code; Create local branches according to the purpose (feature/bugfix/release, etc.) such as: feature/xx; bugfix/xx; release/1.0; Modify the local code, if you modify the code for a long time, at least once a day to push code to the server when the modification is complete, push to the corresponding branch and submit the merge request If the merge request has comments and needs to be modified, commit to the corresponding branch again comments Modified, cut no new, the branch will be merge to Master after modifying the branch merge to master, delete the local branch

Prohibit: Modify the code or create another branch on the branch after merge;
Prohibit: Modify others ' code;
2. Resolution for submission of conflicts

When you modify the code to complete, ready to commit, Git prompts the server code has been modified, you need to do the following steps.


git pull corresponds to the code of the branch, if the code is in conflict with the local, there will be a conflict prompt, which will indicate which files are conflicting Manual file-by-document modification of conflicts, preserving valid and modified portions after the modification is complete, git add and git commit last git push

Forbidden: Conflicting with new open branch submission

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.