JavaRush /Java Blog /Random EN /IntelliJ IDEA User Guide: Version Control Basics
Galina
Level 8

IntelliJ IDEA User Guide: Version Control Basics

Published in the Random EN group
Wikipedia says that " A version control system (from the English Version Control System, VCS or Revision Control System) is software to make it easier to work with changing information. A version control system allows you to store several versions of the same document, if necessary, return to more earlier versions, determine who and when made this or that change, and much more." IntelliJ IDEA User Guide: Version Control Basics - 1
  1. To get your project from the version control system, you need to select Check out from Version Control in the IDEA welcome window or in the menu at the top, VCS and select Git, Git Hub,...

  2. Version control system settings are available in the menu File - other settings - Default settings - Version control. You can select the project root directory for your VCS. You can also always disable VCS.

    IntelliJ IDEA User Guide: Version Control Basics - 2
  3. After connecting VCS to the project, you can see and manage changes. Cmd + 9 for Mac to get the Changes window.

    IntelliJ IDEA User Guide: Version Control Basics - 3
  4. If you need to do some operation with VCS, you can call the pop-up menu of operations Ctrl + V for Mac. For example, if you want to commit changes.

    IntelliJ IDEA User Guide: Version Control Basics - 4
  5. You can track the history of file changes. To do this, you need to go to the VCS - Git (or your any VCS) - Show history menu or in the pop-up menu that appears after right-clicking, select Git (or your VCS) - Show history or Ctrl + V for Mac - Show history.

    IntelliJ IDEA User Guide: Version Control Basics - 5

    In the Log tab, at the bottom right, you can double-click to open the modified file and see the specific changes in it. Marked in green is what has been added.

    IntelliJ IDEA User Guide: Version Control Basics - 6
  6. Annotations allow you to see who changed each specific line of code and when. Annotations are available from the same three menu options: flyout (Ctrl + V for Mac), contextual (right click), and the main VCS menu in the panel.

  7. You can configure the list of ignored files. For example, using the Show ignored files button in Changes

    IntelliJ IDEA User Guide: Version Control Basics - 7
  8. With Git IDEA, you can create, switch, merge, compare, and delete code branches. To see a list of existing branches or create a new one, use either Branches from the main or context menu, the VCS operations pop-up menu, or the control on the right side of the status bar. (Item taken from link )

  9. Patche allows you to save a set of changes as a file, which you can email and then apply to your code. This is useful if you work remotely, without a constant connection to version control, but still need to push your changes to other project members. (information from link )

    This can be done by right-clicking on the modified file in the Changes section and selecting Create Patch.

    IntelliJ IDEA User Guide: Version Control Basics - 8

    You can then check the boxes next to the specific files you want to save to the file.

    IntelliJ IDEA User Guide: Version Control Basics - 9
Written in your own words based on the link .
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION