git + tortoise Use

Source: Internet
Author: User

The previous days in the internship unit back-end project committed two dozen wrong, resulting in two laps, so, it is necessary to think about possible situations, and to do a good deal of measures;

Now the biggest problem is circular, so focus on this problem to solve:

Circle, the reason is the same branch because of the different project personnel to work together or a single project personnel working error caused by the unified branch appeared two lines, so will circle, so, the crux of the problem lies in the settlement of the base.

First, download the project;

Before making changes to the project, pull on the unchanged project to prevent further problems:

As a novice, it is best to build a branch of your own, but this branch is not committed, just for development, then, switch to the branch

Then develop on your new branch and commit

The development work is done, the following is the push problem

First, switch to the main branch, then pull

Here are two scenarios:

In simple cases, the other members did not modify the project during their own modification of the project, which is relatively simple, simply by merging their new branches into the main branch, or by reset the main branch to the new branch from the post commit.

Click OK to add the modified content to the main branch;

Or can be in the main branch, through the merge also line;

The development of other project personnel during their own development,

In this case, you can do this by rebase the new branch

The above picture is the result of Rebase, the new branch base is the newest remote branch, this is the first case, through the merge or reset can be

Is the result of the merge and then the push can be

In fact, a lot of things, so find a project to practice, to carry out some tests, you can learn a lot of things

git + tortoise Use

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.