0% found this document useful (0 votes)
31 views

Git notes

Uploaded by

kasithangamcse92
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)
31 views

Git notes

Uploaded by

kasithangamcse92
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/ 4

What is Github

It’s a distributed cloud decentralized repository where we can maintain our sourceCode /
Automation Framwork source code/ CRS doc /build of the application in one place

There are 2 Software in Git-Community

1. Git HUB : Cloud based repository(software) , which is used maintain the source code in
one place , in order to use it just create an account with https://github.com
2. Git [Git client] : it’s a software should installed in client machine , which is used to
communicate to GITHUB
EG : Git client Software EGit , GitDeskTop , GitBash

Developer Usage of Git : used to maintain the Source of the Application in one place

Automation Usage of Git : used to maintain the entire Automation framework in one place

Why Git is Decentralized Repository?


Git is Decentralized Repository because, in Git before pushing any Code to git Hub,
we have to commit the code to local repository first, make sure code is working in
Local Repository then push Code to GITHUB(Global Repo)
 There are Three stages in Git , start with “Working Diretory”Local
RepoGlobal Repo

What is Git Conflicts


When two or more engineers modified the same file , when Eng-1 one push the file to
GitHub will not get any conflicts , but Eng-2 try to push the same file to GitHub , will get git
Conflicts (because that file already modified by Eng-1)

Solution: Before push any file to GitHub, we should mandatorily Pull the Project & select merge
option , then[eclipse automatically merge the Code with comments]& remove comments manually
& analyse the code then push it

How to create account with Git-Hub


1. Go to www.github.com
2. Click on sign Up
3. Create an account [capture username/password]

How to create Repository in Git-Hub

1. Login to github
2. click on “new Button ” or click on “+”=>new Repository
3. enter all the details & click on “CREATE” BUTTON
4. COPY Git URL

How to create Token ID for Git-Hub instead of password


1. login to GitHub
2. Go to “Profile Image” Icon
3. Click on Settings
4. Click on “Devlopers settings”
5. Click on “Personal Access Token”
6. Click on “Generate new Token” button
7. Enter the TokenID name & select repo “CheckBox”
8. Click on “generate token” button
9. Copy the Token ID

How to share the Eclipse Project to Git


1. Select the Project Right click  Team Share Project
2. Click on Finish

How to push your framework from Working_Dir to Local Repository?

1. Select the Project Right click  Team Commit


2. Drag the Files from upstaged area to Staged-Area
3. With comment
4. Click on “Commit”

How to push your framework from Local_Repo to GitHub [Global Repository]?

1. Select the Project Right click  Team Commit


2. Drag the Files from upstaged area to Staged-Area
3. With comment
4. Click on “Commit-Push”

How to get Framework from GitHub to local System very first Time

1. Go to Eclipse
2. Click on “File”
3. Click on import
4. Expand “Git” folder
5. Click on “Project from git”
6. Click on “Clone URL”
7. Enter “Git URL” username/TokenID
8. Click on finish
9. Enter framework will be loaded from Global Repo to Local Repo

How to push newly created file from Local to Global[GitHub]

1. Select the “new File” in side the package


2. Right Click  team
3. Click on commit
4. Drag the “new File” from upstaged area  staged area
5. Click on “Commit & push”

How to get newly created file from Global[GitHub] to local

1. Select the project


2. Right Click Team
3. Click on “pull” => merge

Click on finish

You might also like