Use of Git

From OpenSSLWiki
Jump to navigationJump to search

Note: This is a superset of the information at

Background information about using the Git distributed version control system[edit]

This page provides examples for some of the git commands used when accessing OpenSSL source code, but does not provide complete coverage.

  • Refer to the git man ages and for more complete instructions on using the command.
  • Refer to for more complete instructions on interacting with Github.

Use of Git with OpenSSL source tree[edit]

The OpenSSL group hosts its own Git repository at, and this contains the master copy of OpenSSL. You can browse this at;a=tree, or get a clone (checkout) of it with the command git clone git://

Contributors to OpenSSL should make use of the Github copy of this repository at Github makes it easy to maintain your own fork of OpenSSL for developing your contributions, as well as making a "pull request" to share fixes with the OpenSSL team when finished. Changes in the master Git repository are represented in the Github copy within minutes.

You can view existing pull requests against any of the branches at

Getting a copy of the OpenSSL source tree[edit]

If you want to quickly make a copy of the OpenSSL source tree and you do not plan to publish any changes for use by others, just create a clone on your own machine.

$ git clone

(Refer to Github documentation for instructions on other means of cloning the source tree.)

If you plan to make changes to the sources that you will share with others, including contributing changes to OpenSSL, it is recommended that you create a fork of the OpenSSL tree using your own Github id. You can use this to share changes with others whether or not you intend to submit changes to the OpenSSL team. Refer to the documentation at, in particular the discussion about how to track changes in the real OpenSSL repository that you forked.


The Git repositories contain multiple branches, representing development levels of OpenSSL as well as current and upcoming stable branches. An easy way to see the available branches is with the branch selector at The branches which are of most interest to most users are

  • master (development)
  • OpenSSL_1_1_0-stable
  • OpenSSL_1_0_2-stable

In order to access the code for a branch other than master, clone the Git repository then use the git checkout branchname command to switch to a different branch. Consider using separate checkouts for each branch you are working in, with appropriate names for each, such as in the following example.

$ git clone OpenSSL-master
$ git clone OpenSSL_1_1_0-stable
$ (cd OpenSSL_1_0_2-stable && git checkout OpenSSL_1_1_0-stable)
$ git clone OpenSSL_1_0_2-stable
$ (cd OpenSSL_1_0_2-stable && git checkout OpenSSL_1_0_2-stable)

If you've created your own fork of OpenSSL, replace the URL on the git clone command with the one for your fork. Also, you'll need to follow the instructions at for picking up changes from the master repository that you forked.

Making pull requests[edit]

After developing and testing changes to OpenSSL in your checkout (clone), push them to your fork of OpenSSL (git push), then use the Github interface to submit a pull request to the master OpenSSL repository for the particular revision(s).

Anyone can comment on PR's, and suggest changes. Before a PR is accepted, it must be approved by two OpenSSL team members.

Use of Git with the OpenSSL web site[edit]

The OpenSSL web site is also maintained in git, and can be browsed at;a=tree.

Unlike the source code, the OpenSSL web site repository is not copied to Github. You can only interact with it via, so it is not possible to submit pull requests.

Check it out as follows:

$ git clone git://

In order to submit corrections to the web site, create a patch as described above.

Only the master branch of the web site repository is used.