docs: Add an overview of the day to day dev workflow This should help folks who aren't familiar with repo and git Change-Id: Id5544a4345653702a683f6a59356c79eb11e0cac
diff --git a/GettingStarted.md b/GettingStarted.md index 9823992..60c08d1 100644 --- a/GettingStarted.md +++ b/GettingStarted.md
@@ -41,10 +41,59 @@ repo sync -j$(nproc) ``` +## Day-to-day Development Workflow + +In general, the way working with repo works is relatively simple: + + 1. Create a working topic branch to make changes on with `repo start + ${TOPICNAME}` + 2. Make your changes to the files. Add them with `git add -A` and commit with + `git commit`. + 3. Upload your changes with `repo upload -r ${REVIEWER} --cc ${CC_LIST}` + 4. Go to the URL repo spits out to read and reply to comments. + 5. Eventually your reviewer will give you a +2 LGTM on your change. To submit, + click the "SUBMIT" button on the change in the web interface. + 6. Run `repo sync -j$(nproc)` to update. + 7. Run `repo prune` to remove your topic branch. + +For more information on how to use repo and git effectively, take a look at the +[official documentation](https://source.android.com/setup/create/coding-tasks). + +### How to sync my local copy with latest? + +``` +repo sync -j$(nproc) +``` + +Then if you have any outstanding branches, a `repo rebase` will help. + +### How to send code for review? + +To upload a branch to gerrit for review, do this: + +``` +repo upload -r ${REVIEWER} --cc ${CC_LIST} +``` + +Repo will then output a URL for you to visit that allows you to make comments +and abandon and merge the changes into the repository. To make changes during +the review process, make your changes to the files, then: + +``` +git add -A # To add the files you've changed +git commit --amend # To update the previous change +repo upload -t -r ${REVIEWER} --cc ${CC_LIST} # To upload the change to Gerrit for review +``` + ## Repository Layout Our layout is pretty simple: +#### hw/ + +Contains the all of the source code and RTL required to build the Shodan +hardware, as well as simulate it in Verilator. + #### build/ Contains build scripts for the whole tree. This is effectively just an @@ -64,6 +113,10 @@ The repo manifest used to glue all the git repositories together. +#### scripts/ + +Contains utility scripts to help automate a few things. + ## More Information - [Information on how to use repo](https://go/repo)