A guide for programming within version control.
- Use a good GUI git client, e.g., GitKraken, SublimeMerge, or Tower.
- Write good commit messages.
- Perform work in a feature branch.
- Push commits to your branch regularly (at least once per day) as a backup strategy.
-
Use imperative present tense in the subject line
[If applied, this commit will] Remove deprecated methods
[If applied, this commit will]
Removed deprecated methods -
Capitalize the subject line
-
Do not end the subject line with a period
-
Limit the subject line to 50 characters
- Avoid including files in source control that are specific to your development
- Avoid merge commits by using a rebase workflow.
- Rebase your branch frequently to incorporate upstream changes.
- Squash multiple trivial commits into a single commit.
- Delete local and remote feature branches after merging.
-
Use fast-forward rebase by default instead of merge when you pull remote changes:
git config --global pull.ff only