Skip to content

GithubForAndroidDevelopers

Robert Wu edited this page Mar 8, 2022 · 4 revisions

GitHub for Android Developers

This document is for internal Android developers (Google Employees) who are contributing to Oboe. The process is a bit different than using "repo" and Gerrit.

Checking out the Repository

mkdir oboe
cd oboe
git clone https://github.com/google/oboe.git

Making a Change

Start by making a branch. I like to include the issue number in the branch name if it is a fix, for example fix-123-more-cowbell

git checkout main
git checkout -b fix-123-more-cowbell

Edit the code using Android Studio. You might want to use the apps/OboeTester project. Then submit your change for review.

git status
git add .
git commit
git push origin fix-123-more-cowbell

To ask for a review, go to the Pull Requests page. At the top of the page there should be a banner asking if you want to create a Pull Request for that change. Create the PR and then assign reviewers.

Modifying a Pull Request

If you need to make changes to the PR, do not use "commit --amend" like you do with repo. Instead create a new commit for each patch.

git add .
git commit

In the commit message, you can reference the Issue so that it will get automatically closed.

Fixes #123

Then push to GitHub.

git push origin fix-123-more-cowbell

When we submit the PR we can "Squash and Merge" all the commits into a single commit.