Thursday, August 3, 2017

Git Usage

Step 1: Window -> Show view -> Git  -> Git Repositories and click Open

Step 2: Clone a Git Repository

URI has to be provided. To get URI

a. Login to Bitbucket repository
b. Need to select the project source code Projects ->EDS-ATLAS -> Soluto Ingestion API and swithc to dev branch.
c. Click on clone option in the left frame and copy the URI

Step 3: Paste the URI, provide username and password and proceed.
This completes cloning of the source code.


Step 4: Project creation with the imported source code

Go to the POM.xml in the project that is intended to create and copy 'groupId' and 'artifactId'.

eg: Expand Working Tree -> IngestionCommonUtils -> Pom.xml and copy

com.asurion.atlas.ingestion - from 'groupId'
IngestionCommonUtils - from 'artifactId'

Step 5: In package explored, Create a maven project and make sure to select "Create a Simple Project(skip archetype selection).
Provide the copied groupid and artifactId
Click Finish.

Step 6: Copy source code to the created Maven Project

Switch to Git Repositories view and get the path of the IngestionCommonUtils\src\main\java\com
Eg:C:\Atlas_Project\git\soluto-ingestion-api\IngestionCommonUtils\src\main\java\com
Note: Copy from com folder

copy and paste in Package Explorer -> IngestionCommonUtils -> src/main/java


Step 7: Update pom.xml according to the one in the repository.

Step 8: commiting changes code.

After updating the code in package Explorer, replace the code in Git Repositories path.
Eg:C:\Atlas_Project\git\soluto-ingestion-api\IngestionCommonUtils\src\main\java\com

Window -> Show view -> Git  -> Git Staging

Modified files would be listed in unstaged Changes. Drag these to Staged Changes and click on "Commit and Push".
Commit will just commit the changes in local repository. Push will push the changes to the server.






No comments:

Post a Comment