Skip to content

Git Strategy

Jen Weber edited this page Nov 22, 2019 · 2 revisions

Commit messages

Use closes #123 in a commit message body, and GitHub will close that issue for you when your PR is merged.

Make extra effort to be descriptive in your commit messages, given that the mono-repo has many packages covering many areas of concern.

When you pair, consider adding your collaborator to the commit message:

Co-authored-by: First Last <example@users.noreply.github.com>

Merge vs Rebase

When in doubt, prefer merging. Don't rebase branches that other people are working on.

Preventing large merge conflict challenges

Update your work-in-progress branch frequently with the contents of master, perhaps every time a PR has been merged. This will prevent divergences and painful merge conflict management.

Avoid having long-lived branches. Prefer incremental PRs.

Resolving Conflicts

Try enabling diff3 format to see more information as you work through merges:

git config --global merge.conflictstyle diff3

Read more about it here