Skip to content

Latest commit

 

History

History

README.md

Git

Git is a distributed version control system. If you would like to read more about git there are many good online resources, a few of which are listed below.

Recommended Workflow

Installation

Git supports multiple platforms. Downloads and be found from the official website.

Setting Author Information

On each new system you use/install git you will want to set your personal author information. You can do so by running the following commands replacing the generic name and email information with your own.

git config --global user.name "Firstname Lastname"
git config --global user.email "your.email@bellevuecollege.edu"

Commit Message Style

We use Tim Pope's recommended "50/72 style" for commit messages.

The blog post is fairly informative but the highlights are:

  • Commit messages should be written in the imperative: "Fix bug" and not "Fixed bug"
  • First line of your commit message should be treated as a subject line
    • Subject lines are mandatory for commit messages
    • Subject lines should be no longer than 50 characters
    • Subject lines should capitalized as if they were titles
  • Second line of your commit message should be a single new line character
  • The third line of your commit message should be treated as the commit message body
    • Commit message bodies are optional for commit messages
    • Commit message body lines should not exceed 72 characters

More Dynamic Commit Messages

Branch Names

All Git repositories should have the following branch at minimum:

  • trunk - should ALWAYS match what is in production

Removing 'Master' terminology

Currently many repositories use a 'Master' and 'Dev' branch system instead of 'Trunk' and 'Dev'. The Trunk terminology was decided on to fit with the tree imagery present in Git. GitHub is moving defaults to 'Main', but using 'Trunk' should not cause conflict.

When you update an application, please update branch names if possible. Directions on updating the Master branch name.

The 'Dev' branch

Currently many responsitories still use the 'git flow' based workflow, which depends on a Dev and Trunk branch instead of using a pull-request based workflow. It is recommended to switch over to the GitHub Flow + Releases workflow instead.

Repository Hosts

We use one repository host:

Helpful GUI Clients

While comfort with the command line is essential for git, there are some useful GUI applications that allow for easier visualization of branches and changes.

Other Documentation

Generate a SSH Key Pair for Authentication