IntelliJ IDEA Version Control
Version Control is a system which records the every modification in a file or a set of files over time so that we can recall specific version later. It allows us to revert selected files back to a previous state, entire project back to a previous state, compare the changes over time and so on. It could also help us to easily recover our lost file.
IntelliJ IDEA IDE supports many version controls such as Git, CVS, TFS, GitHub, Subversion, Mercurial etc. In this section, we will discuss about the most important version controls i.e. Git.
Git integration can be performed by the following methods:
Now, we will understand and learn the working of Git tools and its terminology.
2. Add files to repository
Go to VCS->Git->Add Option
3. Revert Local Changes
It will remove the local changes we have done. To do this:
4. Commit Changes Locally
Commit action involves locally to record the snapshot of our repository in the project history. To commit changes to a local repository, do the following:
5. Push Changes to Remote Repository
It will send the local changes to the remote repository so that they can available for others. To do push action, follow the following steps:
6. Import Existing Project to Git
To add our existing project in the Git repository do the following:
7. Get Updates
To get updates from the repository, do the following -
8. Show History or Log
To view History, do the following -