-
Make your changes in a new git branch:
git checkout -b my-branch master
-
Commit your changes using a descriptive commit message.
git commit -a
Note: the optional commit
-a
command line option will automatically "add" and "rm" edited files. -
Push your branch to GitHub:
git push origin my-branch
-
In GitHub, create a pull request against
sam-styles:master
.
We have precise rules over how our pull requests can be formatted. This leads to more readable release notes that are easy to follow and understand.
Each pull request consists of a title, a description and a label. The title has a special format that includes a scope and a subject:
<scope>: <subject>
Sample:
button: add styles to create a small size button
The scope should be the name of the component affected. For example button
, alert
, etc.
The subject contains a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The description should include the motivation for the change and contrast this with previous behavior.
It must be one of the following:
- build: Changes that affect the build system or external dependencies (example: webpack, fractal, setup scripts)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
After your pull request is merged, you can safely delete your branch and pull the changes from the main repository:
-
Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
git push origin --delete my-branch
-
Check out the master branch:
git checkout master
-
Delete the local branch:
git branch -D my-branch
-
Update your master with the latest master version:
git pull origin master