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

IntelliJ IDEA User Guide: Source 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 facilitate working with changing information. A version control system allows you to store multiple versions of the same document, if necessary, return to more early versions, determine who and when made this or that change, and much more." IntelliJ IDEA User Guide: Source Control Basics - 1
  1. To get your project out of the version control system, you need to select Check out from Version Control in the welcome window of IDEA 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: Source Control Basics - 2
  3. After connecting the VCS on the project, you can see and manage the changes. Cmd + 9 for Mac to get the Changes window.

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

    IntelliJ IDEA User Guide: Source Control Basics - 4
  5. You can track the history of file changes. To do this, in the VCS menu - Git (or your any VCS) - Show history 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: Source Control Basics - 5

    In the Log tab, at the bottom right, you can double-click to open the changed file and see the specific changes in it. Green indicates what has been added.

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

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

    IntelliJ IDEA User Guide: Source Control Basics - 7
  8. In Git, IDEA allows you to 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, or 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 that can be emailed and then applied to code. This is useful if you're working remotely without a permanent connection to source control, but still need to push your changes to other project members. (info 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: Source Control Basics - 8

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

    IntelliJ IDEA User Guide: Source 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