Wiki

Clone wiki

java-cef / ContributingWithGit

This Wiki page provides information about using Git to contribute code changes to JCEF.

Note to Editors: Changes made to this Wiki page without prior approval via the JCEF Forum or Issue Tracker may be lost or reverted.



Overview

The JCEF project uses the Git source code management system hosted via Bitbucket. The easiest way to contribute changes to JCEF is by creating your own personal fork of the JCEF Git repository and submitting pull requests with your proposed modifications. This document is intended as a quick-start guide for developers who already have some familiarity with Git. If you are completely new to Git you might want to review the series of Git tutorials provided by Bitbucket.

Initial Setup

Git can maintain your changes both locally and on a remote server. To work with Git efficiently the remote server locations must be configured properly.

1. Log into Bitbucket and create a forked version of the java-cef.git repository: https://bitbucket.org/chromiumembedded/java-cef/fork.

2. Check out JCEF source code as described on the BranchesAndBuilding Wiki page.

3. Change the remote origin of the JCEF checkout so that it points to your personal forked repository. This is the remote server location that the git push and git pull commands will operate on by default.

cd /path/to/java-cef

# Replace <UserName> with your Bitbucket user name.
git remote set-url origin https://<UserName>@bitbucket.org/<UserName>/java-cef.git

4. Set the remote upstream of the JCEF checkout so that you can merge changes from the main JCEF repository.

git remote add upstream https://bitbucket.org/chromiumembedded/java-cef.git

5. Verify that the remotes are configured correctly.

git remote -v

You should see output like the following:

origin  https://<UserName>@bitbucket.org/<UserName>/java-cef.git (fetch)
origin  https://<UserName>@bitbucket.org/<UserName>/java-cef.git (push)
upstream        https://bitbucket.org/chromiumembedded/java-cef.git (fetch)
upstream        https://bitbucket.org/chromiumembedded/java-cef.git (push)

6. Configure your name and email address.

git config user.name "User Name"
git config user.email user@example.com

7. Configure the correct handling of line endings in the repository.

# Use this value on Windows. Files will be converted to CRLF line endings
# in the working directory and LF line endings in the object database.
git config core.autocrlf true

# Use this value on other platforms. Files will be unchanged in the working
# directory and converted to LF line endings in the object database.
git config core.autocrlf input

# Cause Git to abort actions on files with mixed line endings if the change is
# not reversible (e.g. changes to binary files that are accidentally classified
# as text).
git config core.safecrlf true

Working With Private Changes

You can now commit changes to your personal repository and merge upstream changes from the main JCEF repository. See the Working With Private Changes section of the CEF documentation for detailed information.

Working With Pull Requests

Once your personal changes are complete you can request that they be merged into the main JCEF repository. This is done using a pull request. See the Working With Pull Requests section of the CEF documentation for detailed information.

Updated