Introduction to Version Control with Git and GitHub, 4/21/17
Fundamentally, a Version Control System (VCS) is a system that records changes to a file or set of files over time, so that you can recall specific versions later. It allows you to revert particular files or the entire project back to a previous state, compare changes over time, see who last modified something that might be causing a problem, and more. Most importantly, having your work under version control means that any mistake can easily be reverted.
Version Control is not restricted to source code management, it can be used to version any type of text file on a computer, for instance, text written in any markup language like LaTex, Markdown, reStructuredText. One limitation is that these systems do not usually work well with binary files.
Git is a modern VCS that is fast and flexible to use; thanks to its lightweight branch creation. Git’s popularity is due in part to the availability of cloud hosting services like GitHub, Bitbucket and GitLab. Hosting a Git repositories on a remote service like GitHub greatly facilitates working collaboratively as well as allowing you to frequently backup your work on a remote host.
We will start this workshop by introducing the fundamental concepts of Git. Then we will apply these concepts through some hands-on exercises, which will demonstrate how to build simple Git repositories to freely experiment with Git functionalities. The second part of the workshop will show how to publish to a remote repository on GitHub.
Git is a very extensive tool and we will only cover a subset of its functionalities. The goal of this workshop is to introduce Git's fundamental concepts so you can start using it as an intermediate level user, and give you the foundation for extending your knowledge. No prior knowledge of Git or version control will be necessary, but some familiarity with the Linux command line will be expected.
To participate in the hands-on exercises you will need the following:
1 A laptop.
2. An account on the OIT server called nobel. You can request it at: http://www.princeton.edu/researchcomputing/computational-hardware/nobel/
3. The ability to connect from your laptop to nobel through ssh. Linux and Mac OS X come with a terminal application with ssh already installed. Windows users will need to install an ssh client. We recommend PuTTY as it is the most popular ssh client on Windows.
4. A free GitHub account. You can sign up at https://www.github.com.
David Luet is a Linux system administrator for the department of Geosciences and a software and programming analyst with the Princeton Institute for Computational Science & Engineering (PICSciE) and Research Computing, OIT. He has been using Git extensively for the past 3 years, and helped many research groups on campus to implement collaborative software development workflows based on Git and GitHub. He received his Ph.D. from the department of Mechanical and Aerospace Engineering at Princeton University.
If you have any questions, feel free to e-mail David ( firstname.lastname@example.org ) or come to the weekly Help Sessions, Tuesdays 10-11 am and Thursdays 2-3 pm, in the Visualization Lab, room 347 in the Lewis Library.
Please register online at the training website, www.princeton.edu/training or contact Andrea Rubinstein at email@example.com /258-1397.
Location: Princeton Center for Theoretical Science, 407 Jadwin Hall
Date/Time: 04/21/17 at 10:00 am - 04/21/17 at 4:00 pm