The most complete Pycharm tutorial (37)-Basics of Pycharm Version Control

Source: Internet
Author: User
Tags version control system

The most complete Pycharm tutorial (37)-Basics of Pycharm Version Control

1. Subject

Introduction to Pycharm Version Control System

2. Preparations

(1) The Pycharm version is 2.7 or later.

(2) You have created a project. For more information, see Getting Started tutorial.

(3) install and configure VCS with Remote Access Permissions

3. Enable VCS

Pycharm default version control is unavailable, but you can find the corresponding command in the VCS menu:

In this case, Pycharm browses external resources based on the local history. You can even enable the version control system from this menu. However, in this case, version control only targets the project root directory. For more detailed configuration, see the following section.

4. Enable Version Control

Click the Control button on the main toolbar and click Version Control. By default, only the root directory is available. .

First, click the green plus sign. In the Add VCS Directory Mapping dialog box, click the ellipsis, select the corresponding Directory, and specify the version control system in the following menu (Git is used here ).

Of course, you can specify a version control system for each directory.

Click application to close the dialog box.

5. Effect on the appearance of Pycharm

(1) changing the color of the Solver. py file means that it has not added Version Control

(2) The Changes tool window appears, similar to a button located at the bottom edge of Pycharm. Click it to open a window to view files without version control added.

(3) More commands are displayed on the VCS menu, allowing you to view project Changes and update the entire project, corresponding to and buttons. A response command is also added to the main toolbar.

(4) The VCS menu and project shortcut menu contain Git nodes (depending on the selected version control), which contain specific VCS commands

(5) Git widget appears in the status bar

6. Add version control to a file

In the Changes tool window, files without version control are displayed as follows:

Select Solver. py and press Ctrl + Alt + A to add the corresponding version control. The file color turns green and is successfully added, but not managed yet. Move the file to the Default change table and press Ctrl + K (OR) for hosting:

Verify the correctness and click the Commit button:

As a result, the Solver. py file name turns black again, meaning there are no unupdated changes.

7. files under the. idea directory

Click the button in the Changes tool window and find that all files in the idea directory under the project root directory have no version control, and these files are invisible in the project window.

This part of the file saves the project configuration information, we need to replace it, except the version control file.

8. Ignore files

Open the Ignored Files page (Settings> Version Control> Ignored Files) in the Setting Dialog Box to view the list of Ignored Files by default:

Click the green plus sign to ignore more Files. For more information, see using ing Ignored Files.

9. Editor changes

Edit the code. All changes are marked in the left slot:

Click a tag to bring up a tool window:

This pop-up toolbar can help you navigate, browse, and change operations.

For more information, see Using Change Markers to View and Navigate Through Changes in the Editor

The code file name turns blue, which means there are unmanaged changes.

10. Get the update date

Press Ctrl + T

Click

Use the VCS → Update Project... menu command

Related Article

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.