Skip to content

Instantly share code, notes, and snippets.

@goodell
Last active October 3, 2022 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goodell/6b1391b70ac60f2b93f2 to your computer and use it in GitHub Desktop.
Save goodell/6b1391b70ac60f2b93f2 to your computer and use it in GitHub Desktop.
OMPI Git Dos and Don'ts

Open MPI Git Best Practices

For a nice, relatively brief overview of Git's basic usage, please see the Pro Git book by Scott Chacon, available for free online. If you want to understand the nitty-gritty, check out Git From the Bottom Up.

Otherwise, here are a list of typical "dos" and "don'ts" for Git, some with a specific eye towards Open MPI:

Do

  • make smaller, logically self-contained commits
  • write nice commit messages, with a concise subject line and a useful description of what change is being made and why
  • If you think you screwed up a repository (yours or a shared one), STOP and ask for help on devel@open-mpi.org. Many Git operations are reversible if you don't take too many steps in the wrong direction.
  • run git gc on your repository periodically, it will speed up many operations and shrink the space consumed on disk by your .git directory

Don't

  • change published history
  • change published history!
  • delete or rename published tags, this is a real pain to unwind
  • make large rambling commits that intermix multiple unrelated changes
  • make unnecessary whitespace changes in the same commit where you are changing logic
  • commit any large binaries to the repository, this will rapidly increase the storage space required for everybody's clones
  • use git filter-branch unless you really know what you are doing, and especially don't use it on published history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment