Git/C3/Hosting-Git-Repositories/English
Title of script: Hosting Git Repositories
Author: Priya K
Keywords: Video tutorial, Git, GitHub, repository, creating repository, adding files, commits, releases, creating branches, creating tags
|
|
Slide 1:
Hosting Git Repositories |
Welcome to the spoken tutorial on Hosting Git Repositories. |
Slide 2:Learning Objectives
|
In this tutorial, we will learn about
|
Slide 3:
System requirement
|
To record this tutorial, I am using
You can use any browser of your choice. |
Slide 4:
Pre-requisites
|
For this tutorial, you will need a working Internet connection.
|
Slide 5:
Git repository hosting services
|
First let us learn about Git repository hosting services.
|
Slide 6:
Why GitHub
|
Next we will see why to use GitHub.
|
Next we will learn how to create an account in GitHub. | |
Open web browser >> type www.github.com >> press Enter | Open your web browser and go to www.github.com. |
Point to homepage | Here in the homepage, you have to give your details for registration. |
Type priya-spoken as user name
priyaspoken@gmail.com as emailid |
I will type, priya-spoken as user name and
priyaspoken@gmail.com as email id.
|
Type a password | Then I will type my password.
|
Click on Sign up for GitHub button | Now click on Sign up for GitHub button at the bottom right. |
Highlight Step 2
|
Next in Step 2, we have to choose our plan.
|
Click on Finish sign up button | Now click on Finish sign up button. |
Next we will create a repository in GitHub. | |
Point to New repository button in right side box >> click on it | You can see a button New repository in the right side box.
|
Point to the verification message
|
It shows a message “Please verify your email address”.
|
Open the Gmail account | I have already signed-in to my email id which is registered with GitHub.
|
Point to the GitHub mail | I have an email from GitHub.
|
Click on Verify email address button | Now, click on Verify email address button. |
On GitHub verification page | We are redirected to the GitHub Homepage.
|
We will try to create a repository in GitHub. | |
Click on New repository button | Now click on New repository button in the right side box.
|
Type stories in Repository Name | Let us type “stories” as Repository Name. |
Point to Description field | If you want to give any description about the repository, we can do so here. |
Click on Public option | Next, I will choose Public option, which is free of cost. |
Click on Private option and show the payment details.
|
If we choose Private option, we have to pay some fees to keep our repository private.
|
Again click on Public | Let me click on Public again. |
Click on Initialize this repository with a README box.
|
Click on this checkbox, Initialize this repository with a README.
|
Point to the message “Skip this step if you’re importing an existing repository” | However, if we are importing an existing repository, this box should be unchecked. |
Now click on Create repository button | Now click on Create repository button. |
Highlight User name and repository name | You can see the repository name along with your user name has been created successfully.
|
Point to README.md file
Point the readme writer area |
Once the repository is created, you can see the readme file label at the left bottom.
|
Point to commit, branch and contributor | By default, we can see a commit (i.e) Initial commit, one branch (i.e) master branch and one contributor.
|
Now, let us start working in this repository. | |
Click on New file button | We will begin by adding a file to our repository.
|
Type kids-story.html | A new form opens up for creating a file.
|
Copy and paste the code into the file | I will copy and paste some code into this file, from my Writer document, which I had saved earlier.
|
Let's commit this new file now. | |
Scroll down the page | Scroll down the page to give the commit message. |
Point to the commit message field | Here in the commit message field, you can see the default message Create kids-story.html. |
You can keep the default message or type a new message.
| |
In the extended description, type Added first file of the repository | Here in the next field, you can also give an extended description of the commit.
|
Point to master branch | By default, we commit to the master branch. |
Click on Commit new file button | Now click on Commit new file button. |
Point to kids-story.html | Our new file kids-story.html is added to the repository.
|
Point to 2 commits | Notice that now the commit number is increased to two. |
Click on 2 commits | Let’s click on it. |
Point to the three dots | Here you can see three dots next to the commit message. |
Click on the three dots | Let me click on it. |
Point to the description | It shows the description of the commit. |
Click on Create kids-story.html
|
To know what we have done in the commit, click on that particular commit message. |
Point to the details | Now you can see the details of the commit. |
Go back | Let’s go back to the commit list.
|
Point to hash value | On the right side, you can see the hash value of the commit. |
Click on Code tab | Click on Code tab at the top left corner to come back to the repository.
|
Next let me demonstrate how to create a new branch in GitHub. | |
Click on Branch drop down. | In the left side, you can see a dropdown list labeled Branch.
|
Point to Find or create a branch field. | You can see a pop-up window opens up.
|
Type new-chapter in branch name field | I will type new-chapter as the new branch name and press Enter. |
Point to Branch: new-chapter | You can see that the new-chapter branch is created and it is our current branch.
|
Next, we will make a commit in the new-chapter branch to understand the branching process better.
| |
Click on kids-story.html file | In the repository, click on kids-story.html file to open it. |
Point to edit icon >> click on it | At the top right corner of the editor panel, you can see an edit icon.
|
Copy and paste the lines | I will add some lines here which I have copied from my Writer document.
|
Point to commit message | Now, we will commit this change.
|
Point to new-chapter branch
|
Here you can see the branch name new-chapter where this commit was made. |
Click on Commit changes button | To commit, click on Commit changes button. |
Click on Code tab | Let’s click on Code tab to go back to our repository. |
Next let’s checks the commits of master and new-chapter branches. | |
Click on commits link | Click on commits link. |
Point to Branch dropdown | Here in the Branch drop down, we can select the branch name that we want to see. |
Select master branch
|
I will select master branch in the list.
|
Select new-chapter branch
|
To see the commits of new-chapter branch, we will select new-chapter in the Branch drop down.
|
Click on Code tab | Let’s click on Code tab to go back to our repository. |
Next let us see how to create a tag in GitHub.
| |
Click on releases link | For example say, I want to create a tag in the master branch after adding kids-story.html file.
|
Click on Create a new release button | Click on Create a new release button. |
In the Tag Version box, type V1.0. | A new form opens up.
|
In the Release title box, type Version one. | In the Release title box, type Version one. |
Point to Write tab
Type “This is the version one” |
In the Write box we can give the description of our tag.
|
Click on Publish release button | Now click on Publish release button. |
Point to hash value | Here on the left side, you can see the hash value of the latest commit.
|
With this, we come to the end of this tutorial. | |
Slide 7:
Summary
|
Let us summarize.
|
Slide 8:
Assignment
|
As an assignment
|
Slide 9:
Acknowledgement
|
The video at the following link summarises the Spoken Tutorial project.
|
Slide 10:
Spoken Tutorial Workshops
|
The Spoken Tutorial Project Team conducts workshops and gives certificates to those who pass online tests.
|
Slide 11:
Acknowledgement
|
Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.
|
This is Priya from IIT Bombay signing off. Thanks for joining. |