For Developers‎ > ‎

GitHub Collaboration

This document explains how to collaborate on work in progress by using Git and pushing changes to GitHub.

Alternatives would be to email code diffs or use codereview.chromium.org and git cl patch. However they are brittle and time consuming when patches do no apply cleanly and or are part of several pipelined or dependent patches.

Collaboration via git is made easy by simply using git merge to include code from other patches into a local branch you are working with.

  1. Create a chromium fork on GitHub if you will share code with others.
    1. Fork an existing chromium repository on GitHub such as:
    2. Delete branches you are not interested in.
  2. Add remote references to GitHub respositories (yours or others)
    • git remote add g https://github.com/your-user-name/chromium
    • git remote add other-repo-name https://github.com/other-user-name/chromium
    • (I typically name my own github repo just 'g')
  3. Fetch from github repos
    • git fetch g
    • git fetch other-repo-name
    • Occasionally add --prune to remove any remote-tracking references that no longer exist on the remote.
  4. Merge from github repos
    • git merge other-repo-name/branch-name
  5. Push to github
    • Push current branch
      • git push g HEAD
    • Push all branches where the local names match remote names.
      • git push g :
    • Delete a remote branch
      • git push g -f :remote-branch
Comments