-
Notifications
You must be signed in to change notification settings - Fork 693
Github terminology
GitHub terminology can be complicated, and learning to maneuver the commands comes with a learning curve. here's an easy guide to remember what all the Git and Github terms mean, and how they're all related.
Git is version control software which allows us to track and make changes to the WRF model code.
Github is a website which allows us to store our Git repository online, and gives us a number of helpful ways to use Git features via a web interface (https://github.com), in addition to helpful functionality on top of functions provided in Git, such as forks.
https://github.com/wrf-model/WRF <-- This is the main repository for WRF
Within the main repository there are branches. Unlike with Subversion software, there is no special "trunk" code, technically all branches are equal. The main "branch" (analogous to the trunk) is the master.
A clone of the code is a full copy of the repository: all branches, all tags, everything. To do most things with Git you must have a clone of the repository on your local machine. When you clone a repository, by default the master branch is checked out.
From a software perspective, a cloned repository it is just a regular copy of the WRF code, but with extra information in a directory named ".git" which allows you to change your code to mirror any existing version (branch or "hash") of the code. This is different from the approach in subversion. In subversion, to check out different branches, you had to physically copy that branch from the repository server on the web (with the svn checkout command), and that gave you another whole copy of the code. In Git, when you checkout a different version of the code, whether that be another branch or revision (hash), git software converts the existing files and directories into that version, rather than making another copy of the code.
Github gives us the ability to create forks: a fork is a full clone of the main repository that is still stored on Github, but under your username. For example, my Github username is "mkavulich", so the fork that I created can be found at https://github.com/mkavulich/WRF instead of the main repository URL (https://github.com/wrf-model/WRF). When you create a fork, because it is a clone (copy) of the entire main repository, it also has all the branches from the main repository. However, creating and deleting branches on your fork will not affect the main repository unless you merge those changes back to the main repository explicitly, which is hard to do and should probably never be done.
Just like you can clone the main repository to your local machine for doing command-line work, you can clone your fork as well. Just like the main repository, your fork also has a master branch, in addition to any other branches you create. Changes made to one branch (including the master) do not necessarily carry over to any other branch: you will have to merge changes from one branch to another.