PowerShell/.github/CONTRIBUTING.md
Andrew Schwartzmeyer b8699a046d Fix up contributing guidelines
- Remove CI skip section because we always want CI
- Fix links due to file move
- Add note that CI will fail for PRs from forks
2016-04-22 15:12:02 -07:00

3.8 KiB

Contributing to Project Magrathea

Rules

Do not commit code changes to the master branch!

Don't forget to commit early and often!

All pull requests must pass both CI systems before they will be approved.

Write good commit messages. Follow Tim Pope's guidelines:

  • The first line must be a short, capitalized summary
  • The second line must be blank
  • The rest should be a wrapped, detailed explanation of the what and why
  • The tone should be imperative

New to Git?

Authentication

If you do not have a preferred method of authentication, enable the storage credential helper, which will cache your credentials in plaintext on your system, so use a token.

git config --global credential.helper store

Alternatively, on Windows, you can try the Git Credential Manager for Windows.

Microsoft employees

Microsoft employees should follow Microsoft open source guidelinces.

Particularly:

Branches

  • Checkout a new local branch for every change you want to make (bugfix, feature).
  • Use alias/feature-name pattern.
  • Use lowercase-with-dashes for naming.
  • Use same branch name in superproject and all submodules.

Permissions

If you have difficulty in pushing your changes, there is a high probability that you actually don't have permissions.

Be sure that you have write access to corresponding repo (remember that submodules have their own privilege).

Your should push to this repository instead of a fork so that the CI system can provide credentials to your pull request. If you make a pull request from a fork, the CI will fail.

We highly recommend these configurations to help deal with whitespace, rebasing, and general use of Git.

Auto-corrects your command when it's sure (stats to status)

git config --global help.autoCorrect -1

Refuses to merge when pulling, and only pushes to branch with same name.

git config --global pull.ff only
git config --global push.default current

Shows shorter commit hashes and always shows reference names in the log.

git config --global log.abbrevCommit true
git config --global log.decorate short

Ignores whitespace changes and uses more information when merging.

git config --global apply.ignoreWhitespace change
git config --global rerere.enabled true
git config --global rerere.autoUpdate true
git config --global am.threeWay true

Mapping

Learn about new files locations in PowerShell/PowerShell.

Resources

Learn how to work with string resources in .resx files.