GitHub for Beginners

What is Github?

Github is a company that provides hosting services for Software development version control using Git. – Wikipedia

You can manage you source code using this version control. If you have a work with your team and your team can not engage with same place, you can use this version control. Because in here you manage your work with different people with different places. No needs to stay at the same place.


Advertisement

You can create an account using github site.

GitHub platform home page

Create Repositories – Github for Beginners

What is Repositories? Repository is like a folder in your project. You know all the project files are in your project folder. In this Repositories, they like same as those project folders. you can create Repositories for each projects.

After your create your account you can see a window like this.

GitHub dashboard

In here, you can see, I highlighted some areas. In section A, displays your Repositories. If you have a new account, you can’t see repositories yet. Because you haven’t create yet. Let’s create a repository. Press the green color “New” button in the left side of the home page.

Create new repository in GitHub

Give a repository name and write some description for your repository. Then choose public or private. In public mode, you can add lot of people for your project and the project can see anyone. In the private mode you can add only four members and only four of your can see the project.

After your press “create repository”, you can see a page like this.

GitHub commands to manage the repository

Before introduce this page, you have to download Gitbash. Because we are going to add your files to repository using this gitbash.


File upload using Git Bash – Github for Beginners

After yo installed Gitbash, go to your project folder. Let’s think, In my folder have one HTML file and a CSS file. Right click on your project folder and select “Git Bash here”. you can see a window like this.

Git Bash Terminal

Now we are going to add files to our repository using this command line interface. first write “git init” in the prompt. After pressing enter button, you can see a result like this.

git init command

It means git verify this is a repository. After that write “git add README.md“. This is for add a readme file to your project. Then type “git add .“. After that “git commit -m “Your commit here” “. Commit means your are going to comment what you did in the project. For an example, in here I commit “Files Added”.


Advertisement

After that write “git remote add origin your_repository_url“. Don’t worry. you can copy this in your newly created repository page.

git remote add origin

Finally write “git push origin master“. After pressing enter button you can see your file are uploading. Then refresh your repository page. You can see your files are uploaded.


In the next article you can learn merging, pulling and pushing in Github. If you have any question contact us or leave a comment in the below.

Student Developer pack GitHub (GitHub student pack)Click here to get requirements


Related posts and articles for GitHub.

Thank you for reading. If you are interesting on my article, make sure to follow my other articles as well. Make sure to leave a comment.

guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x