Learning Version Control with GitHub
- Part 1: Why Use Version Control?
- Part 2: Using GitHub
- Part 3: Working with Repositories
- Part 4: Markdown and Code
- Part 5: Managing Repositories
Why use version control?
Work on any large, complex project and the concept of version control becomes important. With things modified between collaborators and different versions, being able to control files become vital for organizing the project.
Version Control: management of changes to collections of information and its associated configurations.
One of the earliest forms of version control for files in a project uses naming conventions. Often, people will name their files using the word “final” or other words in the filename to help them. Depending on the platform, some use underscores or numbers to better help them organize which file is which version.
Such a method can be helpful in organizing files, but checking to see which changes are in what document can become confusing without longer descriptions in the filename or another resource to match which changes are in which file.
Many programs like Microsoft Word and Google Documents can track changes either manually or automatically. Using their tools, changes to individual document can be tracked across time. As long as changes are done to the same file, and it is not saved as a new file, changes can be tracked within them
While the Naming Conventions and Document Changes approaches can work well on a single device and with limited collaborators, projects often span across devices and even organizations. For that purpose, a more centralized approach is needed.
Programs like Git allow for doing version control at both the local and server levels. Files can be organized locally and then uploaded to a central place where other collaborators can access and use them.
Why Git (and GitHub)?
Git allows for users to work on their own devices and then upload to a central place. Other people can then download those files, change them, and Git handles who makes which changes and when a new change is made.
Instead of needing different names for files, Git will track how it is changed over time. Changes can then be tracked and compared on files, collections, and even at a larger, project level.
GitHub is a website that uses Git to track things in repositories. In Git, a repository, sometimes called a “repo” for short, is a collection of files. Users can create them, add collaborators, and even work across repositories as well.
Private repositories cost usually money to use on GitHub, but public repos can be created for free for those who have accounts on the site.