Eclipse & GIT References in Opsera Pipeline

This document will provide an overview of the workflow followed from Bitbucket to IDE and vice versa such as Push, Pull, Commit, Merge Conflict process.

 

How to Clone the Repository

Here are the steps should be followed to clone the repository from Bitbucket to Eclipse.

  • Open Bitbucket > corresponding repository and Click on Clone option

  • Switch to Eclipse and import [File > Import] the above repository using Git

  • Select ‘Projects from Git (with smart import)’ option & click Next

  • Select “Clone URI” & Click “Next” from this screen

  • This will open the configurable fields. Copy the URL & Provide your user name & Password , then click on “ Next “

  • Click ‘Next’

  • Provide the Project directory path

  • Click Next

  • Click Finish

 

Viewing files in Eclipse

 

Project and Files can be viewed under Project Explorer or Navigator.

Git Pull/Fetch operation

 

Steps to be followed to Pull/Fetch the repository from Bitbucket to Eclipse.

  • On Eclipse, Select Project → right click Team → pull option

  • Pull option is used to sync the changes present in Remote (in Bitbucket cloud). This option will fetch all the changes present in the configured branch under that repository.

  • Alternatively, ‘Pull...’ will give the option to pull from any other branch apart from the configured branch.

Git Push/Commit operation

Steps to be followed to Push or Commit changes from Eclipse to Bitbucket.

  • Any changes made in the file will leave > sign against the file name and will be available in Unstaged Changes under Git Staging tab.

 

  • Right click on file on ‘Unstaged changes’ & then Click on Add to Index to move the files to Staged Changes.

 

  • Provide comments and Click on ‘Commit and Push’ to push the changes to Bitbucket.

Git create new branch

 

Steps to be followed to create a new branch.

  • Right click on Project → Team → Switch To → New Branch

  • Click on Select to choose the branch from where the changes need to be pulled

Resolve Merge Conflicts

 

Steps to be followed to resolve merge conflicts,

  • Once the Pull operation is performed, any files with conflicts will have Red color symbol against them.

 

  • To Resolve conflict, Select file and click on Merge Tool

 

  • The difference/comparison of files will be displayed with Eclipse to Bitbucket

 

  • Make necessary changes on the line where conflict is there.

  • Save the file once the conflicts have been resolved and proceed with ‘Add to Index’ to add the file to ‘Staged Changes’.

  • Click on ‘Commit and Push’ to push the changes to Bitbucket. This will resolve the file’s conflict as well as, pushes it to GIT