Friday, April 18, 2014

GitHub Repository



What's GitHub?

GitHub is a web-based hosting service for software development projects that use the Git revision control system.GitHub offers both paid plans for private repositories, and free accounts for open source projects.

How to create an Account at GitHub?

Setup an Account at https://github.com/join. If you want to make your project an OpenSource, GitHub offers the Repository at free of Cost. Once the Account is setup, we get the Login Id and Password. This Credential is vital. Keep it safe and we would use it later.

Let's walk through our GitHub Account from the HomePage.



Step 1: Click New Repositary at bottom right



Step 2: Now fill in the form holding the Repositary Details and create the Repositary.


Step 3:  Once we create the Repositary, we would be navigated to another page where in we could find the ReadMe content along with .gitinore. Also at bottom right, we could find the URL for this Repositary.



Great, we've created a GitHub Repo and we have LoginId, Password, and URL to this Repo. Let's try to create a Hello World Java Application in Eclipse and try to upload in this Repo.

Step 4: Create an Hello World Eclipse Program. We would be Check In at short.



Step 5: Windows -> Preference -> Team -> Git. Make an Entry of user name. This gives the stamp of who edits the File and when while using Git..



Step 6: Let's Check out the Contents from GitHub Repo. In the Project Explorer, select clone Git Repository. This just brings in the below window.

URL -> URL of our GitHub Repo with .git as suffix.
User -> GitHub LoginID.
Password -> GitHub Password.


For all the subsequent Windows -> Give Next and Click Finish.


Step 7: Now we would be able to locate Head, Branch and Tag at Git Repo Explorer - Eclipse. 


Step 9: Now let's sync the Eclipse Project with your Git Repositary in Explorer. Right Click the Project ->Team -> Share Project -> Git - > Select Create Button -> In the Down Select the Repo in above ScreenShot[Here it's Test12332].


Click Finish. Now Right Click Project and choose Commit.

Step 10: Now Time to Check In our Project. Git Explorer -> Remotes-> Origin -> push[link with red arrow].


Step 11: Now login GitHub to have a look at the Reflected Folder.