Skip to content

Version Control and Git

Mark Keller edited this page Feb 21, 2019 · 1 revision

If unfamiliar with version control and/or Git, the following guide lays out these concepts nicely: https://guides.github.com/introduction/git-handbook/

As projects grow, version control is essential, as it allows for making sweeping changes to code without fear of losing previous progress.

When more than one person is working on a project, git branches allow code to be reviewed in small increments based on individual features or bug fixes. In the research group, this would typically involve creating a new branch when working on changes to a repository specific to an individual task, creating a pull request when done, and inviting other group members to review the changes before merging into master or providing constructive feedback.

Branching out from master when working on new features and then merging them back in later is helpful when working individually as well. For example, if you are working on two unrelated tasks simultaneously in the same repository, you would create two different branches and switch between them. Maybe one task is a more long-term goal while another is a small bug fix. You may want to be able to merge in the small bug fix immediately while not concerning yourself with whether the other task is finished.

Clone this wiki locally