Changes

Jump to navigation Jump to search

Workshop: Introduction to version control

347 bytes removed, 23:30, 22 October 2018
no edit summary
''(Generally, this workshop is offered at least once a week on a rotating basis. Check the [http://designandbuildlab.com/?page_id=445/ Lab calendar] for up-to-date availability!)''
'''Version control''' is a technique for managing the complexity of adding and modifying information to a digital project, especially those which are done collaboratively.
When a project is in its infancy, it is fairly straightforward to keep track of the files contained within; it can, however, become unmanageable very quickly - especially if revisions happen frequently. Version control can be imagined as a series of '''snapshots''' of a project's revisions changes as time progresses. Each snapshot allows you to see exactly the state of the project at that time; each time you take a snapshot, you are adding another node to its history. You can travel back to any of these snapshots at any time, and fast forward back to the future.
The version control information (the files, the snapshot information, et al.) are held ''locally'' in a folder called a '''repository''', or repo. You can additionally sync this repo to a server somewhere else - called a '''remote'''. This can serve as a backup, as well as a way to ''share'' ''the repo with others'' who may also be working on the project.
A '''version control system''' (VCS) is a tool that handles all of this complexity: the repo itself, the snapshots, the remote(s), et al. There are many VCs's; the most popular is called '''[https://git-scm.com/downloads git]'''.
 
=== Why use version control? ===
The two advantages that version control provides:
# ''You are able to travel back in time to any point in a project and utilize it from that moment''; and
# if you use a remote, ''collaboration is not only straightforward, it is encouraged''.
=== Terminology ===
'''branch''': a particular timeline of snapshots - the main branch is typically called "master"; other branches may be used to develop new features without risking the master branch's stability
 
=== Why use version control? ===
The two advantages that version control provides:
# ''You are able to travel back in time to any point in a project and utilize it from that moment''; and
# if you use a remote, ''collaboration is not only straightforward, it is encouraged''.
== Utilizing version Control ==
Why use [[version control]]? The two advantages that version control provides:
# ''You are able to travel back in time to any point in a project and utilize it from that moment''; and
# if you use a remote, ''collaboration is not only straightforward, it is encouraged''.
'''This page's examples assume you are using git.'''
 
=== Required tools ===
* A VCS - preferably '''[https://git-scm.com/downloads git]'''.
Git is accessed through the command line interface (CLI) of your choice:
*''Windows'': you can use Git Bash (which was installed when you installed git.)
*''Linux/OSXMacOS'': terminal (which is installed with the operating system)
=== Setting up a repo ===

Navigation menu