If you're fixing a bug, start by forking Jetpack's repository and clone that new fork of Jetpack to your computer. Once you're done, create a new branch following our guidelines. Then, checkout that branch.
git branch branch-name
git checkout branch-name
You can then edit files and commit your changes as you go.
- To get a list of files you've changed, use the status command:
git status
- To show the changes you've made in a line-by-line patch format, use the diff command to output a unified diff of all the changes you made to the source code:
git diff
- To show the differences in a single file, use the diff command (or include multiple file paths to show differences between a set of pages):
git diff path/to/file
To share the changes you've made, you'll need to push your changes to your repository on GitHub, and submit a pull request.
- Start by committing the changes you've made to your local repository. To do so, you'll need to add the files you've changed to the staging area first:
git add .
- Then, commit your changes:
git commit
You'll want to keep the first line of your commit message brief, giving a quick explanation of your changes. You can then give more details in the following lines. - Now that you've committed your changes, they're ready to be pushed to your fork on Github, like so:
git push origin branch-name
- The last step is to create a Pull Request to let us know about your changes. GitHub will prompt you to create this Pull Request when you access your fork:
- Click on "Compare & Pull Request" to create the Pull request.
- When creating that Pull Request, be sure to follow our guidelines here.