Git submits the basic process

Source: Internet
Author: User

In the absence of other branches, everyone commits the code to the same branch master branch:

1. View local changes to the code, which can be submitted to the modified record

git status

Where the modified file is identified as modified, the file deleted is deleted, and the file is added added

2. Add local modifications to your code to the Git pending queue

rm file name #用于删除的文件

3. Submit your own changes to the code

" Submit Comment Description "

4. Update the local code to synchronize with the online version, which occurs when there is no conflict auto-merge

Git pull

Conflicts will prompt for conflict and file names, which need to be modified manually at this time

The file name of the vim conflict

In this file

< <<<<<< HEAD This is the content in the current branch ======= This is the content in the online branch >>>>>>> on-line branch version number

You need to manually merge the relevant code as needed and delete the "<<<<<<< HEAD" row, the "=======" line, and the ">>>>>>> Line branch version number" row

The file is now added to the submission queue and submitted

File name for git add conflict
Git commit-m "Conflict resolution explanation"

5. Upload the changes to the master library

git push

Git submits the basic process

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.