Working with Repositories and Commits in GitHub.
In this article we are to cover more in depth about how to create repositories in GitHub, how to commit to the repository. Firstly we will start by doing the above on the browser. In order for one to do the above actions, you will need a GitHub account, If you do not have an account go ahead and create one HERE.
Also read about: Git and GitHub
First time at GitHub this is the page you will see: After creating an account you will be logged in and you should see a page like this: This page give you the summary of you git status, number of repositories, overviews, projects etc..
Now its time to create the repository, But wait..
What is a Repository?
In simple terms we can say a repository is like a room, place, container where something is deposited or stored and maintained in an organized manner.
Now that we know what a repository is let's go ahead and create one. If it's your first time creating an account you should see a create new repository on home page, but in my case since I have an account it's going to be different.
First I will select the + sign and then choose create new repository, like below:
After selecting that option a new window will display asking me to give the repository name, description (which is optional) and whether to leave it public or set to private and finally initialize with a README.md file.
Also check out: How to write a Good README file Fill in the details and you should have something like this: In order for us to create a commit we will need to add a file first: Lets do that.. Now go ahead and give it a name and add details in the file:
Now since we have added files to our repository it's time we go ahead and commit the changes, scroll to the bottom of the page and you will see the Commit button. But wait first !!
What is a git Commit?
A commit is a command used to save your your changes to the repository safely.
By clicking the Commit button, the files are saved to our created repository earlier like below:
In this article we have seen how we can be able to:
- create a GitHub account,
- create a file in GitHub browser
- Add items to the file
- Create our first commit
Stay tuned for the next article in the series
If You have read this far I really appreciate:
Check out my other Blogs too:
- Useful Resources for Programmers and Web Developers
- Key Differences Between A Website and Web Application
- Know The Difference Between Coding and Programming
- Best Visual Studio Code Extensions For Web Developers
Do share your valuable opinion, I appreciate your honest feedback!
Enjoy Coding ❤