0% found this document useful (0 votes)
131 views24 pages

GitHub Setup

The document provides steps to connect a GitHub repository to an Eclipse project to enable version control and collaboration. It outlines creating accounts, repositories, generating access tokens, cloning repositories in Eclipse, committing and pushing code to GitHub from Eclipse, and pulling the latest code from GitHub.

Uploaded by

Rakesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
131 views24 pages

GitHub Setup

The document provides steps to connect a GitHub repository to an Eclipse project to enable version control and collaboration. It outlines creating accounts, repositories, generating access tokens, cloning repositories in Eclipse, committing and pushing code to GitHub from Eclipse, and pulling the latest code from GitHub.

Uploaded by

Rakesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Reason to use Github:

1. Project will be safely saved in the repository(cloud) . So in case the local code is deleted in the
system, we can use the github to get back the code.
2. While working with big team (multiple members team), sharing the code, committing, updating
is very easier. So, version control(github) solves this problem.

Note: Use professional email id for the github account creation

Step 1 : Create Github Account

Step 2 : Sign in using the same credentials


Step 3: In top right corner click on + symbol and select the “New Repository” option.

Step 4: Give meaningful project name Eg: JavaforAutomation, Description, Select public , check README
document and then click on “Create repository”
Step 3: In top right corner click on + symbol and select the “New Repository” option.
Step 5: Repository created successfully

Note:

1. Copy the Github link to use it in IDE.


2. We can also use to find others project code.
3. We can directly download other projects in IDE
Generating the personal access token:

Go to settings:
Navigate to Developer settings -> Personal Access Token

Click on Generate new token


Ente the Note, select the repo checkbox and click on generate token.
Token is generated:

Note: The highlighted password needs to be used in the Eclipse IDE while access the project rather
than Github login credentials. From 15th Aug 2021 this process is implemented.

Step 6: Open eclipse and select the “Other” view either using menu bar or shortcut

Step 7 : Select Git and click on Open


Step 8 : We must able to these 3 options. In that click on “Clone a Git repository”

Step 9 : Clone Git Repository Window will open


Step 10 : In the github website , under the project, click on “Clone or download” and the click on Copy
button as highlighted in yellow

Step 11: Paste the URL in the Clone Git Repository under URL field
Step 12: Now enter the github user name and generated token and check the store in secure store and
then click on Next button
Step 13 : By default master will be selected. Now Click on Next again.
Step 14 : Click on Finish ( If you want , you can change the directory)

Step 15 : If you want to provide password hint , you can do it. Click on No
Step 16 : Github clone is created in the local

Step 17 : Navigate to Open perspective using menu bar or shortcut icon


Step 18: Select the Java (default) and click on Open

Step 19 :Able to view the project explorer


Step 20: Right click on the Project and Select the Share project from the Team Menu
Step 21: Share project window will be displayed

Step 22: Select the Repository(github) using the dropdown icon. Click on Finish
Step 23: The Java project Icon will be changed
Step 24 : Right click on the project , Select Team and then Click on Commit.
Step 25 : Git staging window will be displayed.
Step 26 : Drag and drop the files from Unstaged changes to Staged Changes, then enter the Commit
message and click on Commit and Push

Step 27 : Code is committed/uploaded to github successfully . Click on Close


Step 28 : Refresh the github page, the code will be uploaded to the github repository
Step 29 : In order to pull latest code from github, use below option
GitHub Summary:
1. Creating the Account

2. Activate the Account via email

3. Create the Github Repository

4. Create the connectivity between Github and Eclipse

5. Commit the code from Eclipse to Github(Uploading)

6. Pull the code from Github to Eclipse(Downloading)

7. Other setting such as access to team , deleting etc..

**********************************End of Document************************************

You might also like