... | @@ -1759,6 +1759,71 @@ git -C ~/Courses/Reviews/cs330/s20 log --since 'January 1 2019' --graph --decora |
... | @@ -1759,6 +1759,71 @@ git -C ~/Courses/Reviews/cs330/s20 log --since 'January 1 2019' --graph --decora |
|
</details>
|
|
</details>
|
|
|
|
|
|
|
|
|
|
|
|
## What is a Commit?
|
|
|
|
|
|
|
|
A **git commit** is a bundled collection of changes to code with a brief
|
|
|
|
description of those changes. Changes can include:
|
|
|
|
|
|
|
|
- Edits to existing code
|
|
|
|
- New code
|
|
|
|
- Removed code
|
|
|
|
- New files
|
|
|
|
- Deleted files
|
|
|
|
- Renamed files
|
|
|
|
|
|
|
|
|
|
|
|
## Writing Good Commit Messages
|
|
|
|
|
|
|
|
You probably noticed that most of the commits are:
|
|
|
|
|
|
|
|
- Short
|
|
|
|
- Written in the imperative verb tense
|
|
|
|
- Under 80 characters
|
|
|
|
- Do not end in punctuation
|
|
|
|
|
|
|
|
Let us examine one of the commits.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
* commit f7cbd3b729afab8455d9105b9bf3cb5cf3ab03a2
|
|
|
|
| Author: Thomas J. Kennedy <tkennedy@cs.odu.edu>
|
|
|
|
| Date: Thu Nov 14 21:49:44 2019 -0500
|
|
|
|
|
|
|
|
|
| Tweak ShapeIterator logic
|
|
|
|
|
|
|
|
|
| ShapeIterator will continue reading from the buffer if null is
|
|
|
|
| encountered (null values are skipped). The ShapeIterator only stops when
|
|
|
|
| the end of the buffer is reached (i.e., theBuffer.readline() == null).
|
|
|
|
```
|
|
|
|
|
|
|
|
The first three lines are commit metadata:
|
|
|
|
- Commit Hash (id)
|
|
|
|
- Author
|
|
|
|
- Date & Time
|
|
|
|
|
|
|
|
The remaining lines (i.e., the commit message) describe a group of changes.
|
|
|
|
|
|
|
|
1. The first line serves the same purpose as an *email subject line*. It is a
|
|
|
|
brief description of the change.
|
|
|
|
|
|
|
|
2. If more detail is needed, a blank line is inserted followed by more
|
|
|
|
description.
|
|
|
|
|
|
|
|
As a general rule all lines should not exceed 80 characters. This avoids
|
|
|
|
horizontal scrolling.
|
|
|
|
|
|
|
|
### Suggested Reading
|
|
|
|
|
|
|
|
If you search Google with the query *"Writing good git commit messages"* you
|
|
|
|
will find more than a few resources. However, I am partial to
|
|
|
|
<https://github.com/erlang/otp/wiki/Writing-good-commit-messages>. The page is
|
|
|
|
short and concise.
|
|
|
|
|
|
|
|
|
|
|
|
## Branches
|
|
|
|
|
|
|
|
T.B.W
|
|
|
|
|
|
|
|
|
|
---
|
|
---
|
|
|
|
|
|
## Workflow Example 2 - This Presentation
|
|
## Workflow Example 2 - This Presentation
|
... | | ... | |