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.
Delete branches you are not interested in.Add remote references to GitHub respositories (yours or others)
- Create a chromium fork on GitHub if you will share code with others.
- Fork an existing chromium repository on GitHub such as:
Fetch from github repos
- 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')
Merge 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.
Push to github
- git merge other-repo-name/branch-name
- Push all branches where the local names match remote names.
- git push g -f :remote-branch