Getting your Github off the Ground

What is Github and why do I have to use it?

Being a successful coder will always involve working with other coders on the same project. There’s simply not enough time or brainpower in the possession of one person to accomplish what companies need to get done. At the simplest level, Github is a way to make that process more streamlined and safer. Github is also the standard for version controlling your projects. Version control means saving things in a way where changes can be undone and recorded.

The Basics

In Github, one of the main things you will utilize is a repository. For our intents and purposes, a repo is basically a folder. You will download the repo to your hard drive, be able to make changes locally then upload these changes to Github.

OK, I’ve got a Repo, what the heck do I do with it?

In this section, I will take you through my workflow using jupyter notebooks. This is only applicable to data scientists/people using python. Here's a primer on jupyter notebooks. First I'll navigate into the repo I created and open a jupyter notebook, then I can type some stuff and save it. Now how do I get this pushed to git?

git add notebook1
git commit -m"commit message"


Branches are one of the most important concepts when you are working with a partner or group on a Github project. They allow you to test your own changes, without having any effect on what’s already been done. In short, branches are one of the most magical parts of git, so let’s go over their structure and how to make them.

git checkout -b "name_of_your_branch"
git merge "branchname"
  1. The Github site has a nice GUI for dealing with merge conflicts if you mess something up
  2. I would rather have the changes uploaded but not merged to git, then merge them locally and not be able to upload them to Github for whatever reason.
  3. If you are working on something with multiple people and they merge their branch then push it to Github you may run into issues if you have poor communication.
  4. If people are sure to merge their changes on Github, as long as you do git pull frequently to grab whatever has been merged this issue will never happen. And if it does happen, you will still be able to interact with the main, just not merge your changes. Merging locally will create a roadblock where you need to fix the merge conflicts before you can do anything else.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store