Integration of Git into Eclipse IDE

The Eclipse IDE provides support for the Git version control system. You can easily perform the necessary Git commands like staging, commit, merge, pull and push via the Eclipse IDE. Git is pre-installed in Eclipse IDE. If git is not installed by default, go to Help > Eclipse Marketplace and install git explicitly.

1. Git Cloning Process: -

  1. This tutorial describes the usage of Git with version 4.4 of the Eclipse IDE. The home page for the Eclipse IDE appears as follows.



2. In the Eclipse Home page, we won’t find any git related options. So, we need to select ‘Window > Show View > Other’ option to open ‘Show View’ dialog box then type ‘Git’ in search bar. Now, you will see ‘Git’ options as below.




3. From ‘Show View’ dialog box, select the necessary options such as ‘Git Repositories, Git Staging’ as shown below to display git options in the Eclipse Home Page.


4. To Clone a remote repository using Git URL, Select the ‘Clone a Git Repository’ option from ‘Git Repositories’ and fill out the required details like URL, authentication etc. as follows, then select ‘Next > Next > Finish’ option.


5. Once the cloning is finished, the remote repository will display as follows in ‘Git Repositories’ Section.


6. Now, we need to import the same git repository into ‘Package Explorer’ section. Right click in ‘Package Explorer’ section > select ‘Import’ option and type ‘Git’ in the search bar, then select ‘Projects from Git > Next > Existing Local Repository > Next > Select a git repository > Next > Finish’ option and the project appears as follows in the ‘Package Explorer’ section.


2. Git Operations (Commit, Push, Pull and Fetch): -

  1. Using the ‘Git Staging’ view, we can commit and push the changes into Local/Remote repository. All the new/modified files appear in the ‘Unstaged changes’ area. Drag all files into the ‘Staged Changes’ area, write a meaningful commit message and press the ‘Commit’ button.


2. Let's make some changes like modifying the output message in the 'HelloWorld.java' file (e.g. inserted Canarys Output line), as shown below. Drag the file into the ‘Staged Changes’ area, write a meaningful commit message and press the ‘Commit and Push’ button. Also, check the changes reflected in the remote repository page below.



3. Git operations (such as commit, pull, push and fetch etc.) can also be performed from ‘Git Repositories’ section as shown below. Right click on your repository of ‘Git Repositories’ and select the appropriated operation.



4.  Basic team operations (such as commit, pull, push and fetch etc.) can also perform from ‘Package Explorer’ section as shown below. Once you have placed a project under version control you can start using team operations on your project. The team operations are available via right-click on your project or file in ‘Project Explorer’ section.



5. Pulling changes made by other project team members. The image below shows changes that are pulled from remote repository. Go to 'Package Explorer' section and Select ‘Team > Pull’ Options.


3. Creating and Switching Git Branches: -

1. To create a new branch, Right-click on your project and select ‘Team > Switch To... > New Branch’ option then give the branch name as well. You can also create branches in the ‘Git Repositories’ view.



2. To switch the branches, Right-click on your project and select ‘Team > Switch To… > master’ (select the branch which you want to switch). You can also switch branches in the ‘Git Repositories’ view.




4. Solving Conflicts:

Whenever two team members of the team change the same file, conflicts may occur. So, we need to fix such conflicts manually.

1.  Let’s take an example of ‘HelloWorld.Java’ file only. Suppose Person A makes changes and Person B also makes changes to the same file, then there can be conflicts as shown below.


Let’s take an example of ‘HelloWorld.Java’ file only. Suppose Person A makes changes and Person B also makes changes to the same file, then there can be conflicts as shown below.


2. After the changes have been manually merged/fixed, save the file to mark the conflicts as resolve and commit the merge commit from ‘Team > Commit’ option.



How to Host your Webpages on Google Drive

If you want to host your webpages quickly but don't have any web sever to host, then google driv...

Read More >

How to Prevent Users from Moving Task to Closed State with a non-Zero value Remaining Work field in VSTS/TFS

In this Blog I am going to explain how we can customize Task in VSTS/TFS to Prevent Users from Movin...

Read More >

How to run NAV 2015 and NAV 2016 Administration tool side by side

Everyone would have installed NAV 2016 RTM and would have faced the same problem, i.e, you couldn...

Read More >

Rapid Start Services in Microsoft Dynamics NAV 2013

RapidStart Services is an integrated tool that helps you to speed up the implementation process and ...

Read More >

How to print TransHeader and TransFooter in Microsoft Dynamics NAV RDLC reports

We know that TransHeader and TransFooter section types were available in NAV 2009 version but there ...

Read More >

VSTS Team project Monitor

Let us discuss how to install VSTS team project monitor and how we can make use of it easily.Particu...

Read More >

VSTS Rollup Service - How to use

          Hi All, Here i'm going to explain How VST...

Read More >

Building an Outlook 2010 Add In Using C#.NET With Visual Studio 2010

How to build an outlook 2010 Add In using C#.Net and Visual Studio 2010?In this post, I’l...

Read More >

Creating a company and upload the packages through Rapid Start Services

In this blog we will see which tools can be used in Dynamics NAV to migrate data into the system and...

Read More >

Data Mining for Supply Chain Management

IntroductionMarket turbulence arising from factors such as rapid introduction and customization of p...

Read More >



Hi Shaik Rabbani,It's so nice to see your Blog which is very important and useful for Java Developers along with other Devlopers as well. It must be appreciated. But I would like to suggest one thing that is technology is getting updated day by day so suggestions is if you would have shoot and uploaded demo video on this title that would be an added Wantage to it. If you would have use colours for text that would have another adwatange. Rest of the things is good. Keep it up.
4/4/2020 9:21:35 PM | Reply

Post a Comment

  • Recent
  • Popular
  • Tag
  • The Ansible Architecture

    Ansible is an open source, IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates. In thi...
  • Subversion (Centralized Version Control System)

    Version control system is a repository of files, often the files for the source code of computer programs with monitored access. They are essential for any form of distributed, collaborative developme...
  • Volume management in Kubernetes

    Since pods created in k8s are ephemeral, we are able to get the data as long as pods are alive, but if pods are terminated data stored in it completely lost and it cannot be get back, for that we need...
  • LDAP Integration with Sonatype Nexus

    Sonatype Nexus supports the Repository Manager integration with various active directory systems for authentication, such as Microsoft Exchange / Active Directory, OpenLDAP, ApacheDS, and others. In o...
Monthly Archive

Contact Us
  • *
  • *