Skip to content

Latest commit

 

History

History
91 lines (63 loc) · 5.27 KB

contributing-pull-requests.md

File metadata and controls

91 lines (63 loc) · 5.27 KB
author description ms.author ms.date ms.service ms.subservice ms.topic no-loc title uid
cgranade
Learn how to submit a GitHub pull request when you are ready to contribute code or documentation to the Microsoft Quantum Development Kit.
chgranad
02/01/2021
azure-quantum
qdk
contributor-guide
Q#
$$v
Opening pull requests
microsoft.quantum.contributing-qdk.overview.pulls

Opening Pull Requests

All of the documentation for the Quantum Development Kit is managed using the Git version control system through the use of several repositories hosted on GitHub. Using Git and GitHub together makes it easy to collaborate widely on the Quantum Development Kit. In particular, any Git repository can be cloned or forked to make a completely independent copy of that repository. This allows you to work on your contribution with the tools and at a pace that you prefer.

When you're ready, you can send us a request to include your contribution into our repos, using GitHub's pull request functionality. The page for each pull request includes details of all the changes that make your contribution, a list of comments on your contribution, and a set of review tools that other members of the community can use to provide feedback and advice.

Note

While a full tutorial on Git is beyond the scope of this guide, we can suggest the following links for more resources on learning Git:

What is a Pull Request?

Having said the above, it's helpful to take a few moments to say what a pull request is. When working with Git, any changes are represented as commits that describe how those changes are related to the state of the repository before those changes. We'll often draw diagrams in which commits are drawn as circles with arrows from previous commits.

Suppose you have started a contribution in a branch called feature. Then your fork of Microsoft/Quantum might look something like this:

A working branch in GitHub

If you make your changes in your local repository, you can pull changes from another repository into yours to catch up to any changes that happened upstream.

Pulling and merging changes from an upstream repo

Pull requests work the same way, but in reverse: when you open a pull request, you ask for the upstream repository to pull your contribution in.

Requesting to pull your changes back into the original repo

When you open a pull request to one of our repositories, GitHub will offer an opportunity for others in the community to see a summary of your changes, to comment on them, and to make suggestions for how to help make an even better contribution.

Screenshot of a pull request in GitHub

Using this process helps us use GitHub functionality to improve contributions and to maintain a high-quality product for the quantum programming community.

How to Make a Pull Request

There are two main ways to make a pull request.
For small changes that only affect a single file, the GitHub web interface can be used to make a pull request entirely online. Simply navigate to the file you want to edit and use the edit icon.
For more complicated contributions, it's most often easier to clone the repository to your local computer to prepare for a pull request first.

Next steps

Congratulations on using Git to help out the Quantum Development Kit community! To learn more about how to contribute code, please continue with the following guide.

[!div class="nextstepaction"] Learn how to contribute code