GitHub Tutorial


What is GitHub?


GitHub, Inc. is a United States-based global company that provides hosting for software development version control using Git.

In 2018, it became a subsidiary of Microsoft for US$7.5 billion.

It offers the distributed version control and source code management (SCM) functionality of Git, plus its own features.

GitHub is mostly used for:

  • Repositories
  • Issue Tracking
  • Commits history
  • Pull requests with code review and comments
  • Integrations Directory
  • Email notifications
  • GitHub Pages (a static web hosting service) etc.

 

What is Git?

Git is a free open source distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows.


First you need to open https://github.com and create an account like below:


After create an account you need to sign in like below:


Then click on Sign in. After sign in you can get your dashboard like below:


Now you need to click start a project.


Then you need to provide repository name like below:


After this you need to click on create repository like below:


After this you can see your repository is created.


Now open eclipse and type git repository in Quick Access like below:


After select Git Repositories it will look like below:


Now you already create a repository in GitHub so you need to select Clone a Git repository like below:


Now you need to copy and paste your GitHub repository url like below:


Then click on next.


Again next.


Now here you can see your local repository location if you want you can change then finish. After finish you need to create a java project in eclipse and crate a class and write below code:


After this you need to right click on your project and select Team -> Share Project like below:


After click on Share project you can get below screen:


In this you need to select your local repository location then finish. After finish again you need to right click on your project and select Team -> commit like below:


After click on commit you can get below screen:


In this you need copy and paste Unstaged Changed to Staged Changed and provide your commit message then click on Commit and Push. After this you can see below screen:


In this case you need to click on next. After next it will ask your GitHub username and password then ok.




After this you need to click on finish then Ok like below:


After this you can go to your GitHub account repository and refresh it then you can see your project is upload to your github repository successfully like below:


Thanks.

No comments: