Basic use of Git with tortoisegit (local exercise)

Source: Internet
Author: User

You must write it yourself to remember, so I'll write it.

Git is really much better than SVN, at least one folder to mark the version information than the SVN folder to put a folder to mark the version information is much more advanced, or you do not want to version management of these files, the deletion can be similar to you (do not use any special methods or tools).

First install the Windows version of Git, and then install Tortoisegit, which are not mentioned.

Create a new folder, such as a test for gitbase as a new project. Currently do not have Chinese, git on the path of Chinese support is not very good, the function seems to be no problem, but garbled what looks really uncomfortable.

1 Create a new project

Options in the Red box in the figure

In general then this dialog box will appear, directly OK

Get out of this dialog box.

2 New test file

Create a new text file (test effect directly), open the document, enter the version one in it, and then save the exit

3 Commit Changes

Right-click in the file and select the Red box option in the diagram to bring up the following dialog box

Select the text document that you just created, fill in the comments in the input box above, such as fill in the version one, then OK, pop Up the following dialog box

Just close it.

Then open the text document, add version two content, save exit, then submit, comment fill in version two, and then view the release record below

4 Version History

Right-click,

The Show log option in the right,

This is the version record.

5 version Recovery

Assuming now that I have made some changes to version two, but I'm not sure if it's a change in the official version, I'll need to build a version branch first (forget what the branch is, and know what it means when you're done).

The options in the red box, establish the branch

I'm here named V3, version three meaning, select the check box to switch to the branch, and then OK

At this point, the right button, found that the menu has changed, the red box in the submission of the time will be submitted to the branch we have just established v3

Now open the text document, add content version three, save exit, submit.

See Version update history again

There are v3 and master two versions of the route.

Now ask the question, I think the Branch V3 version is stable, can be as a part of the main version, that is, version three after the main version of the modification, to merge the changes into the main version, now do the following

6 Switching branches

Red box option, dialog box appears

Select Master, OK

The merge option in the Red box,

Select a merge source, select Branch V3,ok

OK, now look at the text document, which already has version three content.

So, from now on, the main idea of git is to constantly build the analysis, and then merge it into the main branch, so that the whole version is constantly updated. Of course, the relevant functions are necessary, such as version backtracking, is to find that the current version is not good enough to return to a previous version of the re-come, and so on, these features are also very important, but as long as the main line, you can understand why the relevant features. Git itself is developed for use, and features are the most common problems encountered in real-world use. If you are using the process and find a situation that you do not know how to handle, you just have to think about whether people will encounter this situation, if so, then the software should have relevant features or functional combination to help you deal with the problem.

Basic use of Git with tortoisegit (local exercise)

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.