Perhaps you have heard the term GitHub come up a few times in web development discussions, and you’re curious to understand what exactly it is and why it is used. Consider this a basic introduction to something that the Flicker Leap team (and many others around the world) can’t live without.
Background on GitHub
GitHub was founded on 8 February 2008 by Tom Preston-Werner, Chris Wanstrath, P.J. Hyett and Scott Chacon. It was initially written in Ruby on Rails. As of September 2020, GitHub had 56 million users and employed 2500 employees.
What is GitHub?
GitHub is a cloud-based service that provides internet hosting for software development and Git version control. This helps developers store and manage their code while tracking and controlling changes to their code. To better understand what GitHub does, you need to understand what Git and Version Control is.
What is Version Control?
Version control is kind of self-explanatory – it records changes to files over time so that you can access specific versions at a different time.
What is Git?
Git is a version control system, which records different versions of a file. Using Git, for instance, uses version control, which allows you to save a .txt file that contains the words ‘Hello world’ and later change the file to contain the words ‘Hello all’. You would then be able to access the previous version of the file that contained the content ‘Hello world’.
The three primary conditions in which a file can be in is modified-, staged- or committed state:
- Modified state files are revised but uncommitted. In other words, Git does not monitor these files
- Staged state files are files that have been selected and are being committed to the Git repository
- Committed state files are files that are stored in the Git repository
Why is GitHub used?
- It makes it easy for multiple team members to work on the same project (repository)
- It manages multiple repositories
- It makes it easy to contribute to open source projects
- It has excellent documentation
- It offers features such as markdown, gists and GitHub actions
- In-depth security can be assigned and allows you to have easy control and monitoring over a project
Quick overview of GitHub markdown, gist and actions
GitHub facilitates markdown, which is a lightweight and easy-to-use syntax for styling different forms of writing on the platform. Markdown mostly makes use of regular text with a few * or #’s in between to format the display.
Typical formatting includes:
- formatting words as bold or italic
- adding images
- creating lists
In GitHub you can use markdown in a few places:
- Comments in Issues and Pull Requests
- Files with the .md or .markdown extension
For more information, see “Writing on GitHub” in GitHub Help
Gist allows you to turn one or more files into a Git repository and is a simple way to share code snippets and pastes with others. Think of gists as small, easy-to-create snippets, which have versioning. It can be used publicly when you need to share a piece of code with your co-workers or friends, or if you want to refer to your code at a later stage.
GitHub Actions help you automate tasks within your software development lifecycle. They are event-driven, which means that you can run a series of commands after a specified event has occurred. For example, every time someone makes a push request to a repository, you can automatically run a command that executes a testing script.
The Flicker Leap team prefer GitHub, but there are other Git Version Control tools, for example:
GitHub is free to use, but does have a premium membership for those who want to be able to do more. If you’d like to chat with one of our developers about GitHub, give us a call.