Github

GitHub is NOT the same as GIT. While GIT is software that allows you to keep track of your files, GitHub is an online software development platform that allows you to store a copy of your code online. Check the following video to learn more:

We use GitHub because of its main benefit: it allows us to freely store our code online (or remote, as we developers also call it). This is useful, for example, in the case that our computer crashes and our projects are lost.

The second benefit of using an online code storage is that it allows us to work together with other developers, using one central (and remote) repository. This is done using branches, which the GIT section explained.

How to clone a Repository

Making pull requests

A pull request is a term GitHub uses to refer to a request to incorporate code changes from one branch made by a developer (whether it's you or another developer) into the code stored in a different branch of a repository.

Sometimes you'll hear developers speak of "merge requests". This is just another name for the same thing: pulling changes from another branch or fork into your branch and merging the changes with your existing code. Software development platforms like GitLab (an alternative to GitHub) use this the term "merge request" instead of "pull request".

These changes are made in one branch, and the pull request usually is made to merge into the main branch. However, this doesn't happen directly: in normal circumstances, there has to be at least one other person reviewing the proposal before it is approved to be merged. The reason why is simple: it's very easy to merge code that might be buggy or conflicts with what's already there.

Pull requests only happen in remote repositories. This can happen in 2 ways: (1) From one branch to another within the same repository. For more information on this, read:

(2) From one branch to another branch from a forked repository into the original repository. A fork is a copy of a repository, that is stored in your personal GitHub account. Forks let you make changes to a project without affecting the original repository. You can fetch updates from or submit changes to the original repository with pull requests.

While both are important to know about, it's useful to study the second way a little more in-depth because that's how you'll submit your homework:

Being safe (SSH)

SSH stands for Secure Shell and is a way of providing users a secure way of accessing (the content of) a computer over an unsecure network. Simply put, it makes the connection much more difficult to hack or intercept.

When working with online (or what you'll hear more often: remote) code repositories, you might be dealing with unsecure connections. In order to make the connection more secure, you have to use an SSH key. Similar to a real key, this digital key allows your computer to be identified by the network you're trying to access. If the connection has been made you can access and modify the contents of network.

The concept of secure networking through use of identifiers (like an SSH key) is also known as "authentication": are you who you say you are? Authentication is a central idea within programming and you should keep it in mind. You'll also be seeing more of it later!

Check the following videos:

Extra reading

If you just can't get enough, here are some extra links that mentors/students have found useful concerning this topic:


Help us improve the content 🤩

You can leave comments here.

Last updated