Are you a junior developer? Let’s start showcasing your work on GitHub from today!

Why on earth do I need to know how to use GitHub?

Have you ever been in a situation when applying for a developer position and later on being received an email from HR manager saying “Could you give me your GitHub account so that we can check it out?”. Then you suddenly remember that you read about it somewhere and already created an account. However, you left it until now and there is basically nothing in your profile. Well, that’s obviously not a pleasant experience my friend. You just hand over a great opportunity for another guy who does give a damn on what GitHub is.

WTH is GitHub?

According to Wikipedia, GitHub is a Web-based Git version control repository hosting service which provides distributed version control and source code management (SCM).

If these complicated terminologies above are still opaque for you, lemme explain shortly. Under my perspective, GitHub is such an enormous community where developers, either individuals or organizations, store and share their repositories. By joining GitHub, you are also able to not only share your source codes as showcases for your work but also seek for open sources from fellow seasoned developers. Consequently, you can leverage GitHub as a reliable knowledge source when approaching new programming languages, frameworks,…etc. For example, I personally found Airbnb JavaScript Style Guide as an immensely useful source for JavaScript beginner developers. And you can find tons of huge sources like this as well. How? Just simply search key words directly in the search bar, then you’re good to go!

While sharing and searching for repositories are 2 fundamental features that GitHub offers, there are tons of other benefit as well. I would like to name some of the most useful ones especially for junior developers.

Additional helpful features

1. Documentation: most notably README files featuring Markdown — a light weight markup language. You can either create your own README or let GitHub automatically render it when creating a new repository. README is an imperative part of a repository as it allows developers to document descriptions and instructions for their repositories.

2. Issue tracking: a great way to keep track of tasks, improvements and bugs in your repository. Issues tracking in GitHub is organized in a way that is relatively similar to a thread consisting of title, description, labels, milestone and comments. Its excellent text formatting & friendly UI provide a great collaboration place for team members for debugging and enhancing their projects.

3. Pull request let you tell others about changes you have pushed to a branch of repository. After opening a pull request, you can collaborate with your mates by adding commits, commenting and ultimately merging the pull request when you are satisfied with proposed changes.

4. Commits history keeps record of all your changes in your repository. Commits usually display a commit message in which you can briefly describe what changes you have made. Commits history in a repository normally looks like this:

How to register for a GitHub account

Now that you are somehow aware of GitHub and its main features. You can sign up an account in GitHub homepage. and it is free unless you want to create private repositories.

How to push your local project files to a GitHub repository

  1. Install Git in your computer
  2. Open Git Bash at your local folder directory and initiate a new repository on your local project
$ git init 
$ git init

3. Add files & make the first commit

$ git add .
$ git commit -m "your_message"
$ git commit -m “Added all files”

4. Create a new repository in your GitHub account in your browser

Create a new repository on your GitHub account
Name and write brief description for your repository

5. Relying on the instruction after creating a new repository, let’s come back to Git Bash to add a new remote repository, which has similar URL with your repository’s address on GitHub

https://github.com/yourUserName/your_repository.git is your remote repository’s address
$ git remote add origin url
Add the remote repository to your local repository (master branch)

Finally, you can push your local repository to GitHub’s remote repository

$ git push -u origin master

After that, when refreshing your repository on GitHub, you should be able to see your live repository. Congratulation!

Common issues when creating new repository

  • Login credential: when pushing local repository to your remote one, you might be asked for your GitHub login information. All you need to do is filling in and let Git do the rest.
  • Pushing errors: happen sometimes when you do not add files to your local repository and make first commit. Remember that after initializing a new repository in your local project folder, you still have to complete these 2 mandatory steps to be able to make a push command.

In conclusion…

To sum up, all of these above information & tips probably give you some ideas on how useful GitHub is for us as developers. Nonetheless, you might guess that GitHub offers much more than an environment for people to share repositories. Indeed, there are still a host of benefits that GitHub bring especially for collaboration within a team or organization. However, they are out of this blog’s scope. Therefore, I have put some useful links bellow.

Finally, I strongly believe that by frequently contributing to GitHub, specifically constantly pushing your own repositories as well as spending time developing on others, we are also honing our skillsets and enhancing portfolios. Thanks for reading & happy coding everyone!

Helpful sources:

  1. GitHub Basics Course on TreeHouse
  2. GitHub Crash Course (Traversy Media)
  3. GitHub Tutorial for Beginners (LearnCode.Academy)
  4. Understanding the GitHub flow
  5. About Pull Requests
  6. Mastering Issues

Say Hello on my channels: Facebook, Twitter, LinkedIn, personal site

Stay tuned for upcoming Front-End blogs this December! 👌👋👨‍💻

Like what you read? Give Vinh Le a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.