Learning Github

Learning Github

I just started to learn coding in a Tech program known as The Knowledge House and what a journey it has been. To start, we learned about a repository hosting service called Github. For those that are not so “tech savvy”, I know “repository”, what exactly do you do with that. It might sound like a lot but it is a simple idea: Github is a web-based service where people from all over the world collaborate and share ideas or work together on coding projects without having to be in the same room. 

Similar to social media, where you can communicate on one idea no matter where you are located. The message that you communicate can be to a private group of people or open to the public. Likewise, Github works similarly. 

Interacting with Github might be a little more complex that just using Twitter and Instagram, but once the user is able to understand the commands, it becomes as easy as riding a bicycle. 

The first thing that you need to is to go to the Github website and create a username and ID. Once you are there, you can create the folder that you will be working out of. Once you’ve created the folder you upstream from your “Terminal” (on the Mac) to the folder (repository) that you’ve created using the pull command. Finally, once you’ve done that you will be able to view your “folder” (project) on the repository you’ve created on Github. It will be ready to be access by your team and any edits they make to the project will be notated and you will be able to access them. When you are ready, you will be able to access those changes to your personal PC by pulling it from Github. 

In the beginning, those two actions can be a nightmare. There are many factors to consider when pushing and pulling from Github. 

There is another analogy that the process can be compared to and that: Github is like passing information on a tree. The reason being is that on a tree you have leaves, branches, trunk, and root. Similarly, you have a Working Tree on Github and this is known as the “untacked” area. Most mistake occur at this level when you begin to send the edits you’ve made to the wrong branch, trying to create a branch that already exist, trying to push, before “fetching”, or any array of tedious errors that when brand new eyes it seems difficult to resolve. However, thank God that, there is a manual and a million other individuals that struggle at the same point because understanding the error is a quick google search or (for the visual and auditory learners like myself) there is YouTube. 

From getting familiarized with Github and making a`1` million and one mistakes, I’ve learned that its not about avoiding the mistakes but it is instead about understanding what the mistake is and figuring out the best methods to resolve it. 

I find myself learning a lot more from my mistakes in this booth camp so far. 

Below you will find step by step directions in how to get started.

Using The Command line to PUSH to Github

  1. Create a new repository -> Fill in all the requested information
  2. Download Github in Terminal (Terminal can be found on a Mac by using the finder app and searching "Terminal".
  3. Initialized the git repository by typing [git init] on the command line in the Terminal.
  4. Add the files from you local repository [ git add] and check the files which are going to be staged with the command [git status]
  5. Commit the files staged in from your local repository bu writing a message using the [git commit -m "the message you want your team to see"].
  6. Return back to Github and then copy the remote repository link so that you can add it on the command line [git remote add origin "https://github.com your url...."]
  7. Push the code from local repository to remote repository [git push -u origin master]. Side note: "-u" is a flag that you are sending your information upstream and the master is the name of the branch that you are sending the information to be clone at. If you are not automatically signed it, it will require you to use a password.
  8. Afterwards you will be able to see your files on Github.

To view or add a comment, sign in

More articles by Burnaur James

Others also viewed

Explore content categories